ListBoxCell(x,y) = ListBox

This may sound odd, but I want to embed and entire listbox into the cell of a ‘parent’ listbox.
How can I get the Paint methods to do this, given that if a cell has a label set to sublist that the child, cell is painted with an entire listbox.

DesktopListbox has a DrawInto method that you can experiment with. Historically this has been a little dodgy but maybe it’s been fixed since I last tried it.

Does an expandable row listbox not do what you want?

sorry, Tim, It does not.

how about set the other Listbox object to a cell.tag then you could open a pop up window with the listbox object you stored in the tag?

i remember DrawInto need a Listbox inside or outside (beside the visible bounds) of the Window and you must set the height.

I seem to recall setting a label in the cell to the name of an object and was able to call that objects paint(g) method.

No, there’s no way to “call” a Paint method. That’s an event and it is triggered for you by the framework as needed.

What’s the larger picture here? Do you also need interactivity with the embedded Listbox?

You can trigger a paint event by calling (API2):

Window.refresh() // or other object
Window.refresh(True) // force the paint now, rather when it would normally happen.

ListBox also has a “RefreshCell” method.

1 Like