B4J Question [B4X] B4XSwitch: Enable/Disable

GMan

Well-Known Member
Licensed User
Longtime User
I am using the B4XSwitch's in a B4J-Code and want to set them Disable/Enable.

B4XSwitch1.??? show no relvant result.


Am i missing something or how can i solve this ?
 
A better way:

Change the XUI Views.b4xlib file extension to .zip.

Include this code on B4XSwitch.bas file.

Code:
Public Sub setEnabled (enabled As Boolean)
 mBase.Enabled = enabled
End Sub

Save Changes.

Change the file extension back to .b4xlib

Refresh libraries.

Now you have the property enabled
Code:
B4XSwitch1.Enabled = False
 
Last edited:
Upvote 0
Thx for the suggestion, but i am using the XUI lib, so no B4XSwitch.bas available.
 
Upvote 0
The XUI Views library is a B4XLibrary which is a zip file.
Eme Fabionacci explained you what to do.
When you unzip the XUI Views.b4xlib file you find one bas file for each view.
You can modify them, zip all the files and sub folders again and rename the .zip extension back to .b4xlib.
The main drawback in doing so, is that you have a personal library and when Erel updates it, yours will not be updated.
Another suggestion is to post a wish thread for this.
 
Last edited:
Upvote 0
Ah OK, Got it now and will give it a try :)
 
Upvote 0
תודה - Thx for the quick solution :)
 
Upvote 0
Back
Top