Re: [MSEide-MSEgui-talk] ttreelistedititem.getselectednodes doesn't work?

2016-11-22 Thread Krzysztof
2016-11-22 8:17 GMT+01:00 Martin Schreiber :
>
>
> Another option is to set ttreeitemedit.itemlist.options
> no_cellitemselect which updates ns_selected by the cell selection state.
>

Thanks! That is what I wanted, just get selected items without checkboxes
--
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] ttreelistedititem.getselectednodes doesn't work?

2016-11-21 Thread Martin Schreiber
On 11/21/2016 09:42 PM, Krzysztof wrote:
> Hi Martin,
> 
> How to get selected childs from ttreelistedititem? For example this code:
> 
> procedure TfrmViewTree.PrintSelected(const sender: TObject);
> begin
> 
> writeln(length(ttreeitemedit1.selecteditems),'|',Length(FLibraryNode.getselectednodes()));
> end;
> 
> ttreeitemedit1.selecteditems return <>0 but FLibraryNode.getselectednodes()
> is 0. They have the same meanings right?

No, ttreeitemedit.selecteditems returns the items of the selected cells
of the grid. ttreelistitem.getselectednodes returns nodes where
tlistitem.selected = true (tlistitem.state ns_selected is set).

In order to set the selected state by GUI set
ttreeitemedit.itemlist.options no_checkbox and set tlistitem.state
ns_checkbox for nodes which should show a checkbox, see attachment with
[ns_checkbox,ns_showchildchecked] and ttreeitemedit.itemlist.options
[no_checkbox,no_updatechildchecked].
ttreelistitem.getcheckednodes() returns an array of the checked nodes.

Another option is to set ttreeitemedit.itemlist.options
no_cellitemselect which updates ns_selected by the cell selection state.

Martin
--
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


[MSEide-MSEgui-talk] ttreelistedititem.getselectednodes doesn't work?

2016-11-21 Thread Krzysztof
Hi Martin,

How to get selected childs from ttreelistedititem? For example this code:

procedure TfrmViewTree.PrintSelected(const sender: TObject);
begin

writeln(length(ttreeitemedit1.selecteditems),'|',Length(FLibraryNode.getselectednodes()));
end;

ttreeitemedit1.selecteditems return <>0 but FLibraryNode.getselectednodes()
is 0. They have the same meanings right? Tried with all getnodemodety

1. Run attached demo
2. Select random node from "Library" root
3. Click "btnView" with opened console output.

Regards


mseselectednodes.7z
Description: application/7z-compressed
--
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk