Default WebStyles

Hi all.
Is there a way to have the same style settings for the same object type everywhere in the webapp?
For example, I’d like to have all webtextfields with the same default height and the same default font size, and for the buttons too…

I’m rebuilding 2 old cgi webapps and I found this big difficult…

Thanks in advance…

in the app.htmlheader property ?

Ok… and do I have to use it as css, right? And how can I have different settings for labels, buttons, text fields…?

And (for example) if I want to have one textfield in bold and others in plain text?

So… is there some examples (something more “complicated” than the one in the built-in examples)?

Thanks a lot!

I don’t know whether this is the best approach, but it worked for me:

  • in Web 1.0 I created subclasses of controls, and specified the style for each subclass. Then used the appropriate subclass everywhere.
  • In Web 2.0, the same can be done but also you can use the CSS file to specify styling. I specify the default styling in the CSS file and use subclasses where specific styling is defined only for exceptions to the general rule. I start to create my basic CSS file with one of the generators that can be found online and complete the detail work using Stylizer 7.

Surely I want to work in 2.0 framework. But really, I don’t have idea on how to start… I’ve added a WebStyle in my project and then? How can I tell it if I want the bold or not, the text height… etc…

Thanks a lot!


Web 1.0 webstyles will not work in Web 2.0. Take a look at @Jean-Yves_Pochez suggested links. This is going to give you an excellent primer.

1 Like

Thanks a lot… Now I have a very nice starting point.

like this (for dummies like me) :slight_smile:

1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.