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 ?
 

Eme Fibonacci

Well-Known Member
Licensed User
Longtime User
A better way:

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

Include this code on B4XSwitch.bas file.

B4X:
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
B4X:
B4XSwitch1.Enabled = False
 
Last edited:
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
Thx for the suggestion, but i am using the XUI lib, so no B4XSwitch.bas available.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
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 modiy them, zip all the files and subfolders again and rename the .zip extension back to .b4xlib.
The main drawback in dooing 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 ths.
 
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
Ah OK, Got it now and will give it a try :)
 
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
תודה - Thx for the quick solution :)
 
Upvote 0
Top