Hello,
I am using widget library to show button with a label on it. But I want to show an image with the label on button image. Is this possible with any case?
Thanks in advance.
Hello,
I am using widget library to show button with a label on it. But I want to show an image with the label on button image. Is this possible with any case?
Thanks in advance.
Yes, you can use an image for the button, and have a text label on top generated by the widget. Is that what you are asking?
I am using rectangle image for the button and also text on it. For example, on a rectangle button I am using text “NEXT”. I want a arrow image with this text on the same rectangle button image which will look like “NEXT->”. Can you please suggest solution for this?
Oh, okay. There are two ways that you could do this:
Create the button background image with the -> on it, and use that for the Next button.
If you don’t want to do that so you can keep the same background image for multiple buttons (ones with and without the ->), then create the widget button and position it. Put blank spaces in the text label for where you want the -> image to go, then calculate the position of the button and add a new image (not button) on top of it. I had done that in one of my apps with putting a Facebook icon into a button. Since I knew the buttons were never going to move and were always in the same position, it was fairly easy.
Unless I am misunderstanding you, why not just specify what image to be the button rather than overlay another image?
defaultFile = “image.png”,
overFile = “image_over.png”, – image displayed when the button is pressed.
label = "button"
-Saer
Yes, you can use an image for the button, and have a text label on top generated by the widget. Is that what you are asking?
I am using rectangle image for the button and also text on it. For example, on a rectangle button I am using text “NEXT”. I want a arrow image with this text on the same rectangle button image which will look like “NEXT->”. Can you please suggest solution for this?
Oh, okay. There are two ways that you could do this:
Create the button background image with the -> on it, and use that for the Next button.
If you don’t want to do that so you can keep the same background image for multiple buttons (ones with and without the ->), then create the widget button and position it. Put blank spaces in the text label for where you want the -> image to go, then calculate the position of the button and add a new image (not button) on top of it. I had done that in one of my apps with putting a Facebook icon into a button. Since I knew the buttons were never going to move and were always in the same position, it was fairly easy.
Unless I am misunderstanding you, why not just specify what image to be the button rather than overlay another image?
defaultFile = “image.png”,
overFile = “image_over.png”, – image displayed when the button is pressed.
label = "button"
-Saer