by
allistar >> Wed, 6 Nov 2002 20:57:46 GMT
On Wed, 6 Nov 2002 3:02:04 GMT,
synergos@bigpond.com (synergos) wrote:
Can anyone provide a clue as how to create a tree list with a check box attached to each item within the list?
Thanks
Synergos
We create a subclassed ListBox control (called "CheckBoxList"). On
that we added a "myTable" reference of type "Table". on the
windowCreated event of the CheckBoxList control we create the table
and add embed it in the list box (by setting the .parent property to self. Then add it to the form using the form.addControl method.
When the table is created you can them give it one column with the inputType of each cell set to InputType_CheckBox.
We have modified the events so that when an item in the list box is expanded (for multi level list boxes) that the appropriate rows in the table are make visible/invisible. Write methods on the list box to retrieve and set the checked state of each item in the list.
The nice thing about this implimentation is that you can easily have multiple colunms of checks in the table.
Regards,
Allistar.
------------------------------------------------------------------
Allistar Melville
Software Developer
Auckland, NEW ZEALAND
Greentree International,
Developer of Greentree Financial Software. ------------------------------------------------------------------