ColorGroups don't seem to work in custom table cells

<https://xojo.com/issue/58924>

I allowed a couple of days to update my app for dark mode using Xojo 2019 r 3 but I’m at day five and I keep finding issues where it doesn’t work as documented/advertised. And now I can’t go back to the previous version.

So @Greg O’Lone I hope some of these bugs can get some love pretty soon. :slight_smile:

Custom table cells are tricky. As they only get “refreshed” when you tell them to. My suggestion is to reassign the color when populating the cell.

I’ll be talking about more tips and tricks for Dark Mode on iOS at Xojo.Connect 2020 in Nashville.

[quote=472424:@Greg O’Lone]Custom table cells are tricky. As they only get “refreshed” when you tell them to. My suggestion is to reassign the color when populating the cell.

I’ll be talking about more tips and tricks for Dark Mode on iOS at Xojo.Connect 2020 in Nashville.[/quote]

Just to be clear, then, you’re saying that assigning a ColorGroup to a control on a custom table cell only ever chooses between the light and dark color at the time you set it? Whereas assigning a ColorGroup to a control in any other place automatically switches between the light and dark colors? And that this is all by design?

We do a little magic behind the scenes to force a refresh on individual controls when users change between light & dark mode. As I said, custom rows are special in that they don’t actually get refreshed until you tell them to via the RefreshData method. The reason we don’t do this automatically is because it could cause data to shift if the underlying dataset has changed and the only person in a place to deal with that is you.

Yes I’m fine with all that Greg. The issue is that refreshing the custom table cell doesn’t fix this either. Instead you need to reassign the color value as Antonio has detailed in the Feedback report. So the bug then is that, when it comes to color values in custom table cells, refresh doesn’t work.

I suggest following Antonio’s workaround for now.