teccToggle (Xojo Web Plugin)

teccToggle (Xojo Web Plugin)

I needed a toggle button the other day. Since I wanted to familiarize myself with the Web SDK anyway, I developed this new button control as a plugin.

You can change almost any aspect of the button. The plugin is delivered together with a demo project. For your projects, you only have to copy the “teccToggle” class into a project, and the new button appears at the bottom of the library.

You can change almost every aspect of this toggle button but not the size (doesn’t make much sense):

All changeable parameters are visually shown in the IDE. The final “product” then looks like this:

All the parameters should be self-explanatory. I suggest you play around with the demo project, and you will understand the different settings in no time.

Please note that this plugin only works in Xojo Web 2 and not in Xojo Web 1. There will be no porting of the code to the outdated release.

The prefix ‘tecc’ is registered with Xojo Inc., please ensure to not use this prefix in any plugins you might develop in future. You can ask Xojo for registration of your own prefix.

This plugin is freeware and it is unconditionally available for any use but is without warranty and w/o any official support.

I think (and hope) we will see such a button in future in the Xojo Web 2 standard libraries, as it is contained in the bootstrap framework, but for the time being, this should help as a “workaround”. I still prefer to only work with plugins, where they are inevitable, as every add-on is blowing up the framework.

Update: released as open source project.

Did you find this article valuable?

Support Jeannot Muller by becoming a sponsor. Any amount is appreciated!