Most of the postings that discuss this are several years old, prior to the new API, and it sounds painful to do. Is that still the case?
I could redesign the UI to use a checkbox cell and a button OUTSIDE of the table, or just have the user select the row and press a button outside the table, but since only one row can be operated on at a time, placing the control inside the cell seems the best choice.
Placing an arbitrary control in a Table/ListBox is something I do all the time in more sophisticated applications – sure would be nice if Xojo supported that…
@MarkusR – exactly – what makes a checkbox different than a push button? I have popup menus, checkboxes, push buttons, editable text fields, disclosure triangles, color swatch control etc all over my list box / Tables over on MacOS / IOS.
@Martin_T – That’s a very nice example of a viable workaround, Martin.
I don’t suppose there’s a way to have Xojo go into a mouse-down loop and track if the mouse is in the cell, and only draw the button highlighted if the mouse is still in the cell bounds? I think most users would expect a button-like shape to have basic control/button behavior.
@KarenA – how do you get the cell’s coordinates? I see how to get the row and column from mouse coordinates, but MouseDown is an event of DesktopUIControl, not of a cell (right?). You would need the cell’s coordinates, local to the ListBox in order to do a meaningful comparison (and take into account scrolling).
Thanks Martin
I have your example with desktop canvas and desktop oval
expanded and works very well.
Finally, when you activate a line, the blue background is just a background.
So far, my drawings or images have been overdrawn in PaintcellBackgroud in blue
Hello Martin,
I was just using PaintCellText event for my color control the whole time. The idea of putting my pictures there with g.drawpicture didn’t occur to me either.
Thank you