WebButton style madness

Hi all,

If I make a web button and style it a bit, it shows up as correctly styled when the page loads, then reverts to the platform-specific (much smaller, not styled) button a fraction of a second later.

You can see this in the screen capture video here:

https://www.dropbox.com/s/x56jkdqhqa49yot/Xojo%20button%20size%20bug.mp4?dl=0

If I refresh the page (which I do twice in this video), you can see the effect. You may have to download the video from DropBox and step through it frame by frame to see what’s going on, it happens so fast.

Is there any solution to this? Must I wait until 2024 when we’re on the moon and the new Xojo web framework is out, or is there some fix I can do today?

Thanks!

If you are able to reproduce this behavior in a simple project, perhaps we can take a look at the code and tell you what’s happening.

Hi @Tim Parnell. This seems timing-related. The project that exhibits this behavior does a bunch of database things before it displays the page, and has half a dozen controls on the main page. The test project I just made with one button doesn’t have the problem.

I’m now in the process of adding controls to the test project to see if I can get it to fail. Stand by.

Ahhh, once again the problem is a flawed biological unit.

Turns out I had a “shown” event handler on the button in question. The handler changed the size of the button. Apparently that was enough to make the style go Poof!

Life will be much better when we’re all replaced by AI. I volunteer to go first.