Checkbox in listbox not displaying after open

in the open event of an listbox I load listbox rows and set column 0 as type checkbox,
but the checkbox does not display after window opening. I have to click into the listbox
to display the checkboxes.
what do I have to do to display checkboxes immediately ?

try calling listbox1.invalidate after setting column 0 to typeCheckbox.

does not work, I think I’m in the wrong event

Yea, you won’t want to do that from the Open Event. Call it after the open event has completed.

You could start a ModeSingle timer in Open that invalidates the listbox after a couple 10th of a second delay.

I cannot reproduce the problem. Checkboxes show up properly when I set the column type in Listbox.Open, either before or after I load data in the columns. This in on Windows 7, Xojo 2014r2.1

thanks guys,
I put it in a function and it is now working.
now I have the next problem.
How can I change the value of the checkbox in a listbox from not ticked to ticked or the other way round ?

The LR is your friend :
http://documentation.xojo.com/index.php/ListBox.CellCheck

thanks Michael

my listbox has only 2 columns, a checkbox and a text describing the checkbox.
now I don’t need a row selection, I used list index = -1 and this works good, but
the first row will always be selected after klicking on it, all other rows you can click staying unselected.
Any idea how I can avoid having the 1. row selected ?

http://documentation.xojo.com/index.php/ListBox.RequiresSelection

does not make any difference.
I can click any where in the listbox, it works except 1.row always gets selected,
I only want to use the checkbox in column 0, which works fine, the row should not be highlighted,
has anybody an idea to avoid the 1. row from highlighting ?

[quote=128574:@Johann JFK]does not make any difference.
I can click any where in the listbox, it works except 1.row always gets selected,
I only want to use the checkbox in column 0, which works fine, the row should not be highlighted,
has anybody an idea to avoid the 1. row from highlighting ?[/quote]

http://documentation.xojo.com/index.php/ListBox.Selected