P Pops Member Licensed User Longtime User Dec 8, 2011 #1 I have a button background image that I wish to do an If/Else statement on: If the button1 background image is myimage.png then button1.Text = "1". Problem is, I'm not sure what the path is. The image is set when the app starts up. Thank you for any help you can give. Sent from my Samsung Infuse
I have a button background image that I wish to do an If/Else statement on: If the button1 background image is myimage.png then button1.Text = "1". Problem is, I'm not sure what the path is. The image is set when the app starts up. Thank you for any help you can give. Sent from my Samsung Infuse
vb1992 Well-Known Member Licensed User Longtime User Dec 8, 2011 #2 If you loaded this image into your project it is: (File.DirAssets, "myimage.png") for further reading see post: http://www.b4x.com/forum/basic4andr...0831-how-create-image-rollover.html#post60641 Last edited: Dec 8, 2011 Upvote 0
If you loaded this image into your project it is: (File.DirAssets, "myimage.png") for further reading see post: http://www.b4x.com/forum/basic4andr...0831-how-create-image-rollover.html#post60641
P Pops Member Licensed User Longtime User Dec 8, 2011 #3 I've tried that, I think my syntax is wrong: If button1.background = Sent from my Samsung Infuse Upvote 0
vb1992 Well-Known Member Licensed User Longtime User Dec 8, 2011 #4 You could also store that info int he Button1.tag If Button1.tag = "pic1.png" then do this If Button1.tag = "pic2.png" then do this Just remember to set it Button1.tag = "pic1.png" Upvote 0
You could also store that info int he Button1.tag If Button1.tag = "pic1.png" then do this If Button1.tag = "pic2.png" then do this Just remember to set it Button1.tag = "pic1.png"
P Pops Member Licensed User Longtime User Dec 8, 2011 #5 Thank you, I'll try it when I get home. Upvote 0