Hey,
Found this post when searching for a switch control for web.
Tried it in 2024r3 but it does not seem to do anything.
Anyone else got this to work or has it broken in newer versions of our beloved X?
Hey,
Found this post when searching for a switch control for web.
Tried it in 2024r3 but it does not seem to do anything.
Anyone else got this to work or has it broken in newer versions of our beloved X?
Found the issue. Changed ‘custom-switch’ to ‘form-switch’ and it works
Me.ExecuteJavaScript(“document.getElementById('” + Me.ControlID + “').classList.add(‘form-switch’);”)
Have a great night!
Thanks for sharing solution
Using 2024r3 it’s easier, you can just go to the advanced tab and place the “form-switch” class name here:
We’ve included an example (“Applying Bootstrap CSS classes to controls”) with some useful CSS Classes you can use in your projects, including the Switch control:
Here is the blog post with the announcement:
Introducing Named Color and CSS Classes in Xojo Web
Ricardo,
Thanks a lot. This example helps to solve many problem related to CSS and UI.