unable to put the eye icon button in box, once change the sizes image not visible,
it is under box..
Related
I have a button. when I click that button my app should look like 2nd one.
before clicking button:
after clicking button background color of some item will be changed. like this:
Is it possible to change the map POI icons with a custom image or logo? I tried from StyleEditor, but i could change only the color of the selected POI.
You can change the color and texture of that selected POI category
e.g: in the StyleEditor, select "restaurant” from the map and change its color to red->all restaurant POIs will be red.
Each POI has a unique texture ID associated to it (found in the "TexID" text box)
e.g: out-of-the box the restaurant POI has texture id 1020 associated to it
Changing the ID to another texture ID: insert the new ID (see Features window at zoom levels 17-18) in the "TexID" text box (make sure that you choose "All Levels" before making the change so that the texture changes is applied at all zoom levels).
To add a new a new texture: first, make sure the image you want to add is in PNG format, colour space RGB, and the image resolution is 512x512 px.
copy the image in StyleEditor/MapResources/Common folder or in the Style's folder (e.g: StyleEditor/DayStyle folder if you are modifying the Daystyle)
add the texture in the StyleEditor from the Dialogs menu -> “Add Textures” option
browse for the desired image, in the "Add Textures" dialog box, by pressing the + button
give it an ID (make sure its unique) by entering it in the TextureID input box
click Add & OK buttons to finish adding up the new texture
Make sure to save your style
**if I had a text box and a button.if I typed a letter in text box then the control has to be automatically focus on the button.so that when I hit enter the code under the button will execute **
I tried button1.focus();// in text box but it transfering the control to button so that I cant able to type in text box.
1.Select the form on which the button resides.
2.In the Properties window, set the form's AcceptButton property to the Button control's name.
I have a button in LWUIT Form, and I have an icon that should be drawn in this button, I want the icon to fill all the button space without leaving any white space between the button border and the icon in it, how could I do this ?
For example: let's assume the icon is simply a green square, using the following code:
Button button = new Button(Image.createImage("/green.JPG"));
form.addComponent(button);
I got the following result when the item is focused:
How can I remove the white border surrounding the "green" icon of the button when it's focused (I'll replace the whole icon image with another image to represent the focus state) ?
1) The gap, which is the white border, between the content, the green icon, and the component boundary is called the padding. To fit the image with button boundaries, remove the padding in all direction (TOP, BOTTOM, LEFT and RIGHT) in each of the component states, viz Unselected, Selected, Pressed and Disabled.
So for unselected state it is
button.getUnselectedStyle().setPadding(0, 0, 0, 0);
do this for other state's of the button.
You might want to play around with the margin of the button to fit it suitably within the container.
2) To remove the border of the button call the below syntactic method for each component state
button.get[ComponentState]Style().setBorder(null, false);
In your case for focused state, button.getSelectedStyle().setBorder(null, false);
3) To set the icon for the appropriate state of button use the following methods,
button.setIcon(image);
button.setRollOverIcon(image);
button.setPressedIcon(image);
I have created button without any border using LWUIT resource editor. I am able to see that button with all my properties set. However, when i am trying to add an image into this button using its image constructor, i am able to see a thick border around my image. I tried changing the button into Label, still image is coming. Please help.
Have you set the button border type as Empty on ResourceEdit? If not, set the button border type as Empty for selected and unselected style on ResourceEdit. It should work.