Access the value of a TreeView Checkbox
Posted
#1
(In Topic #661)
Trainee
bazzvn
Posted
Guru

….I see that it is possible to show a checkbox for each item in a qt4/qt5 TreeView control….
Can you post some code showing how you do this.
Posted
Expert

This enables a single select only radio button next to each treeview item.
If you then set the mode parameter to multiple, the radiobutton changes to a checkbox and and you can select multiple items in any child node.
The Selection parameter of the treeview maintains a string array of the keys of the selected items.
To get a count of these is
Code (gambas)
Cheers - Quin.
I code therefore I am
I code therefore I am
Posted
Trainee
Cogier, I can't provide more information on the ShowCheck property than has already been provided by Quin, but any suggestions for a better way to do it than in my example would be welcome.
Posted
Guru

<LIST>
- <LI>The Form is now expandable</LI>
<LIST>
- <LI>The list is now updated by a Timer, so you don't have to leave the TreeView to update</LI>
<LIST>
- <LI>Added a simple NewItem Form, the Timer sorts the rest</LI>
<LIST>
- <LI>aTemp now loaded in one line</LI>
I hope it helps.
Posted
Trainee
Thanks again.
Best wishes to all,
bazzvn
1 guest and 0 members have just viewed this.


