B4J Library [B4X] [B4XLib] SD SwitchAdv (3 states)

Switch with 2 or 3 states. Horizontal or vertical. You can choose the style. All selectable from Design

Note: Even if it is a B4XLib library, it is not allowed to decompress it, read and / or modify the sources. It is also not allowed to rename the library. Unless you are explicitly authorized by the author.

SD_SwitchAdv

Author:
Star-Dust
Version: 0.02
  • SD_SwitchAdv
    • Events:
      • ChangeNumericValue (Value As Int, UsersChange As Boolean) ' 3 State - 0-off; 1-middle; 2-on
      • ChangeValue (Value As Boolean, UsersChange As Boolean) ' Only 2 state - False-off; True-on
    • Fields:
      • mBase As B4XView
      • Tag As Object
    • Functions:
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
        Base type must be Object
      • GetBase As B4XView
      • Initialize (Callback As Object, EventName As String)
    • Properties:
      • intValue As Int
        0-off; 1-middle; 2-on
      • ThirdstateValue As Boolean
      • Value As Boolean


V1.gif
2.gif
 

Attachments

  • aSample.zip
    8.7 KB · Views: 434
  • iSample.zip
    2.7 KB · Views: 376
  • jSample.zip
    2.3 KB · Views: 406
  • SD_SwitchAdv.b4xlib
    52.3 KB · Views: 485
Last edited:

Unobtainius

Active Member
Licensed User
Longtime User
just out of interest, I thought I would ask instead of downloading and finding out. (I am very lazy yes)
is it a fixed size, eg no matter what size I drag its container in the designer, it will always have the same dimensions?
Or does it resize proportionally to the container size? (keeping its aspect ratio of course)
 

Star-Dust

Expert
Licensed User
Longtime User
just out of interest, I thought I would ask instead of downloading and finding out. (I am very lazy yes)
is it a fixed size, eg no matter what size I drag its container in the designer, it will always have the same dimensions?
Or does it resize proportionally to the container size? (keeping its aspect ratio of course)
Yes
 

Unobtainius

Active Member
Licensed User
Longtime User
Beautiful as always. I love the three states. Really good for database fields that are either; initially null, then true, or false. Thanks
 
Top