moore_it Well-Known Member Licensed User Longtime User Nov 18, 2014 #1 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 ...
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 Nov 18, 2014 #2 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
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.
moore_it Well-Known Member Licensed User Longtime User Nov 18, 2014 #3 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
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
klaus Expert Licensed User Longtime User Nov 18, 2014 #4 Code: Copy If sw1.Value = True Then SubA Else SubB End If To change the Switch state you must click on it. Upvote 0
Code: Copy If sw1.Value = True Then SubA Else SubB End If To change the Switch state you must click on it.
moore_it Well-Known Member Licensed User Longtime User Nov 18, 2014 #5 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 48.1 KB · Views: 670 Upvote 0
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 ?
klaus Expert Licensed User Longtime User Nov 18, 2014 #6 What happens when you click on the Switch ? Does it change or not. Otherwise post your project (IDE menu File / Export As Zip) so we can see what you have done and how. Upvote 0
What happens when you click on the Switch ? Does it change or not. Otherwise post your project (IDE menu File / Export As Zip) so we can see what you have done and how.
moore_it Well-Known Member Licensed User Longtime User Nov 18, 2014 #7 yes it change i change in on state but when i click on bottom right button ... switch value is false Upvote 0
klaus Expert Licensed User Longtime User Nov 18, 2014 #8 As already requested, post your project. Without seeing what you have done and how it's difficult to help. Upvote 0
As already requested, post your project. Without seeing what you have done and how it's difficult to help.
moore_it Well-Known Member Licensed User Longtime User Nov 18, 2014 #9 ok this evening now is impossible ... thanks again Upvote 0
moore_it Well-Known Member Licensed User Longtime User Nov 19, 2014 #10 this is the project thanks for your help Toni Attachments BADama.b4i.zip BADama.b4i.zip 3.2 KB · Views: 449 Upvote 0
moore_it Well-Known Member Licensed User Longtime User Nov 19, 2014 #11 I'm so very sorry, i resolved my problem, it's a my stupid error ! Sorry again Toni Upvote 0
klaus Expert Licensed User Longtime User Nov 19, 2014 #12 When you zip a project you should do it in the IDE menu File / Export As Zip, as already suggested in post #6. This way all relevant files are included. Upvote 0
When you zip a project you should do it in the IDE menu File / Export As Zip, as already suggested in post #6. This way all relevant files are included.
moore_it Well-Known Member Licensed User Longtime User Nov 19, 2014 #13 Hello klaus, the file is too big (688k) the uplaod limit is 500k. Upvote 0
klaus Expert Licensed User Longtime User Nov 19, 2014 #14 OK. Do you have hudge images in there ? Upvote 0
klaus Expert Licensed User Longtime User Nov 19, 2014 #16 In such cases it might be interesting to make a smaller project showing the problem. And sometimes, the small one works OK and allows to find the problem (personal experience). Upvote 0
In such cases it might be interesting to make a smaller project showing the problem. And sometimes, the small one works OK and allows to find the problem (personal experience).
moore_it Well-Known Member Licensed User Longtime User Nov 19, 2014 #17 Thanks klaus for the tips, i'm an absolute beginner in B4I/B4J. Upvote 0
klaus Expert Licensed User Longtime User Nov 19, 2014 #18 ...i'm an absolute beginner in B4I/B4J. Click to expand... Me too . Upvote 0
tcgoh Active Member Licensed User Longtime User Nov 25, 2014 #20 Is it possible to set the Switch Size? or add a text on the switch like "ON"/"OFF", "I/O" Upvote 0