B4A Class B4XSwitch_AdjSize - B4XSwitch with adjustable size

Hi all

This is a mod of the B4XSwitch class in the XUIViews library. I wanted a smaller switch than the default one, and got it by modifying a bit the code.

There's a new property called 'Size', with 5 possible values: XS, S, M, L and XL. Default value is M, the original size.


Hope you find it useful

Best regards


  • B4XSwitch_AdjSize.bas
    5.4 KB · Views: 344
Last edited:

Ivan Aldaz

Licensed User
Longtime User
Sorry, this is the first time I share a class, and I was not aware of what you say. I have changed the name of the thread and have uploaded the same file also renamed


Licensed User
Longtime User
Very, very nice. Thanks.
I need this because the original B4XSwitch, by default, has a large size and don't fit with the layout of my app.