ListBox Internal Events

what I am looking for (and I have searched to no avail). Is precisely what Xojo does (ie. sequence of events), when the developer DOES NOT over-ride CellBackGroundPaint and CellTextPaint

I think this all it is

  • Fill the cell area with the default color (white, since I see no Inspector property)
  • display the cell contents (if any) using the listbox level font data (black)
  • draw any border(s) if any

black/white would be reversed in darkmode

the only way to change colors and/or font/size IS by calling one or both of those events?

Xojo doesnt document most event orders on most controls

yes
if you dont you get whatever default behaviour the listbox framework code does
thats why you implement those events - to change that default behaviour

In reality I am writing a “ListBox” control for use with Swift (iOS/macOS) (for a future episode of “Swift for Xojo Developers” :slight_smile: and wanted to make sure my default behaviour was in line.

This version will support things that the standard Listbox doesn’t, varying RowHeights, direct control of colors/fonts at the Cell, Column or Row level, and a future version may allow merging of cells but I haven’t decided that yet

[quote=477535:@Dave S]what I am looking for (and I have searched to no avail). Is precisely what Xojo does (ie. sequence of events), when the developer DOES NOT over-ride CellBackGroundPaint and CellTextPaint

I think this all it is

  • Fill the cell area with the default color (white, since I see no Inspector property)
    [/quote]

IIRC when i was first writing my listbox subclass 10 years ago I found that behavior to be platform specific for selected rows.

-karen