I do not find properties Multiselect in the TreeView.
Can I in some way select several items at once?

Re: TreeView and Multiselect. by Saurabh

Saurabh
Wed Feb 11 06:54:41 CST 2004

Yes you can. Inherit your class from the treecontrol and add a new property
for Selections. Maintain an arraylist in your class for selected nodes. then
every time the user clicks on a node, depending on the Ctrl or Shift button
status, add the nodes into the arraylist. Expose this arraylist as
Selections from your tree control.

As far as the drawing of selected items is concerned, you will need to
override OnBeforeSelect and OnAfterSelect and do your painting work

Hope this helps,

--Saurabh

"Vladimir Bezugliy" <vbez@inbox.ru> wrote in message
news:df4401c3f099$b7fadf00$a301280a@phx.gbl...
> I do not find properties Multiselect in the TreeView.
> Can I in some way select several items at once?



Re: TreeView and Multiselect. by Lloyd

Lloyd
Wed Feb 11 10:33:37 CST 2004

The "windows" way with a treeview is to use checkboxes. The control has a
"CheckBoxes" property. This gives great flexiblity without having to paint
the items yourself. You capture the BeforeCheck and AfterCheck events to
deal with the user's input (ie if you check a node that has child nodes do
you want to check all the child nodes??)

To determine the state after the fact you iterate thru the node and check
the "Checked" property.

Lloyd Sheen
s
"Vladimir Bezugliy" <vbez@inbox.ru> wrote in message
news:df4401c3f099$b7fadf00$a301280a@phx.gbl...
> I do not find properties Multiselect in the TreeView.
> Can I in some way select several items at once?