Graphical ToggleButton sample

bluedude

Well-Known Member
Licensed User
Longtime User
Hereby a graphical ToggleButton. Useful for toggles for WIFI etc.
 

Attachments

  • ToggleState.zip
    19.7 KB · Views: 1,668

peacemaker

Expert
Licensed User
Longtime User
Thanks, good sample.
I hope it can help to create Tabs view (tabs without host, fully controllable grafically comparing to TabHost)
 
Upvote 0

fdx12345

Active Member
Licensed User
Longtime User
Now change the button picture through b4a code

Now how do we change the gif image of a button through b4a code? I need to be able to do this on the fly.

Bill
 
Upvote 0

fdx12345

Active Member
Licensed User
Longtime User
Change gif image of a button

I need the user to be able to assign a gif to a button as an option.

Bill
 
Upvote 0

lagore

Active Member
Licensed User
Longtime User
Hi you can use the following;
B4X:
Dim bm As Bitmap
   bm.Initialize(File.DirAssets,"checkmark_green.png")

   OkBtn.SetBackgroundImage(bm)
just put a variable in place of "checkmark_green.png" and load that in code from the user selection. It can be a .jpg, .png, .bmp or .gif
 
Last edited:
Upvote 0
Top