Webstyle working on debugger but not working on xojocloud

Here is some code for a webstyle that I declare in the web app opening event:

DarkGreenBackground = New webstyle
DarkGreenBackground.BackgroundColor = Color.RGB(0,128,0)
DarkGreenBackground.BorderColor= Color.RGB(0,128,0)
DarkGreenBackground.ForegroundColor = Color.White

here’s what I get on debugger locally

and here is what I get on Xojocloud (no darkgreen color appearing) Any ideas why ?

Thanks for any help :slight_smile:

Jean-Maurice

Make sure you clear the cache on your browser.

I did clear the cache and it doesn’t work. In fact, it looks like my bootstrap icons are not loading.

Here is the code in the opening event of my toolbar but nothing shows on the cloud. Maybe a problem on the server itself ?

Self.Title = “Horaires GroupeVZ”
Me.Icon = yinyan

Me.style = app.DarkGreenBackground
Me.Indicator = WebUIControl.Indicators.Dark // to put text in white

Var btn As New WebToolbarButton
btn.style = WebToolbarButton.ButtonStyles.PushButton
btn.Icon = WebPicture.BootstrapIcon(“Search”)
btn.Caption = “Search”
Me.AddItem(btn)

btn = New WebToolbarButton
btn.style = WebToolbarButton.ButtonStyles.FlexibleSpace
Me.AddItem(btn)

btn = New WebToolbarButton
btn.style = WebToolbarButton.ButtonStyles.PushButton
btn.Icon = WebPicture.BootstrapIcon(“Box arrow in right”)
btn.Caption = “Identification”

btn.Enabled = True
Me.AddItem(btn)

btn = New WebToolbarButton
btn.style = WebToolbarButton.ButtonStyles.FlexibleSpace
Me.AddItem(btn)

Thanks for any suggestion

Jean-maurice :slight_smile:

Try putting something on the page that changes each time you deploy. Just to make sure the newer version is actually running.

1 Like

I did try with the example toolbar in the examples and it’s working ! The only difference in my program is that I use directly a webtoolbar and then in the opening.event I use Me.addItem(btn) and in the example they subclass the webtoolbar and use self.additem(btn) in the opening event of the class. Can it be the reason ? I don’t know :slight_smile:

I wil try later today or tomorrow to do the same thing with my own program.

It doesn’t explain why the webstyles are nor working though … In process … I’ll come back to you.

Jean-Maurice

It works with the subclass !! I don’t understand why it doesn’t work with the webtoolbar directly but if I use a subclass of a webtoolbar and in the opening event of the subclass, I initialize the toolbar, it works !

For the webstyle, it works when I directly put the styles in the opening event of the control but I can’t declare my style in the APP opening event and use it after. It doesn’t work that way. It has to be put in the control itself.

Jean-Maurice

Hi @Jean-Maurice_Vandergoten, if you feel like this could be a bug in Xojo Web and you have a sample project that you can share with us, please open an Issue.

2 Likes