I’ve found that if I have my Listbox set to “Allow Expandable Rows”, then any empty row cannot be highlighted. I can still “technically” select them, as my Cut/Copy/Paste/Delete/Duplicate/Move code still works with them, you just cannot see that there are highlighted. Turn off “Allow Expandable Rows”, and everything works as before.
A bug? Or something special I have to do to highlight empty rows on a Listbox setup for Expandable Rows?
Expandable rows only highlights the text in windows, if there is no text, nothing can be highlighted. Maybe add some spaces in there if you want a selection?
You could probably get around this by doing your own painting with PaintCellBackground so you can paint to the end of the line if that is what you want.
Make the listbox, with a few entries that looks something similar to how your program is showing the entries, use the same settings for the listbox, and either add the data manually at design time or in the opening event of the listbox so they look similar to what you are experiencing. So I dont have to guess what you’re doing from your description and screenshots. Save it as a new binary project, upload it, and post the link here. Also, please let me know what version of xojo you’re using.
My description was fairly spot on. I’ll go over it again in detail.
I have a Desktop Listbox.
I have it set to “Allow Expandable Rows” because I’ll be using a mixture of regular and Expandable Rows.
I have some regular rows that will be purposely blank. These regular rows are highlightable when clicked on when the Desktop Listbox is NOT set to “Allow Expandable Rows”, but when it IS set to “Allow Expandable Rows”, they are not highlightable when clicked.
These regular blank rows are still there, and can be interacted with using my Cut/Copy/Delete/Move buttons. They are just not highlightable when the Desktop Listbox is set to “Allow Expandable Rows”.
When you turn on Allow Expandable Rows, they are now all expandable rows whether or not they have a + next to them or not.
As I mentioned above;
Expandable rows only highlights the text in windows, if there is no text, nothing can be highlighted
You could probably get around this by doing your own painting with PaintCellBackground so you can paint to the end of the line if that is what you want.