Hector
Unbelievable! Though it seems a roundabout route using three computer languages to change a font and background color, your method worked like a charm. I can not only override Bootstrap (which I have spent an awful lot of time doing over the years), but I can create my own classes and apply them.
You have no idea how many times I’ve asked this question and how many ways. I guess perseverance is the operative methodology here.
FYI, I have uncovered the following caveats thus far. On my Mac M1, using Xojo 2022 Version 1, a CSS class definition using a border will not surround an object. On a button it will surround three sides, on a web list it will border the top and left. Using styles you can border the button just fine, but in the web list (after you subclass the list), the result with the border is the same as when using CSS. Shadow does not evidently work on a list, either via style or CSS.
Whether the transience of the Control ID will become a problem as Greg said, I suspect this is due to the style properties getting their information in advance of knowing the control’s size. I have set the control size through code and turned off the locking, but the results don’t change.
To get a decent border around a list I presume I’ll end up doing what I do for the desktop and just use a canvas control. As Greg mentioned previously, the Web List is evidently descended from the open source Datatable, so it presumably has its own styling rules. I can style buttons and labels all day long, but web lists don’t suffer too many alterations.
Needless to say, you’ve saved me a boatload of time and effort. I have seen similar code back when I was just starting to fool with Xojo web (a few days ago) but it made no sense to me till you added that one line explanation. Then I got it running in four minutes.
Thank you,
fritz