iOS Question Switch

moore_it

Well-Known Member
Licensed User
Longtime User
Hello,

please help me, how works switch ?

I try this but not work,

sub sw1_valuechanged(value as boolean)
sw1.value = value
and sub

thanks guy ...
 

klaus

Expert
Licensed User
Longtime User
What exactly do you want to do ?
The sw1_ValueChanged event routine is called when you click on the switch and Value returns the switch state.
If the switch is 'ON' Value = True.
If the switch is 'OFF' Value = False.
It's similar to the CheckBox in B4A.
 
Upvote 0

moore_it

Well-Known Member
Licensed User
Longtime User
Hi Klaus,

in an pane ia have a switch, if is true when i click on a button go to sub a if switch is false go to sub b ....
but the switch not work in this mode it's every false (the default state)
I don't understand how it work.

thanks
 
Upvote 0

moore_it

Well-Known Member
Licensed User
Longtime User
This is the view , when i click on button in right bottom, if the switch is on go to 'sub a' if it off go to 'sub b'.
But if i set switch on, when i click the button the value is always off ....

why ?
 

Attachments

  • IMG_1694.PNG
    IMG_1694.PNG
    48.1 KB · Views: 391
Upvote 0

moore_it

Well-Known Member
Licensed User
Longtime User
yes it change
i change in on state
but when i click on bottom right button ... switch value is false
 
Upvote 0

tcgoh

Active Member
Licensed User
Longtime User
Is it possible to set the Switch Size? or add a text on the switch like "ON"/"OFF", "I/O"
 
Upvote 0
Top