Hi,
This a very basic ImgButton with an icon and a text on the right side.
The problem is that the generated html always contains 2 DIVs:
the expected one, with a table in it for the right icon and label;
and DIV showing a default sc/skins/Enterprise/images/ImgButton/button.png.
If the real icon is big enough the ‘default img’ may not be visible but it’s always there.
Am I missing something here? The code is very simple:
Pls see the attached img.
These buttons are members on a ToolStrip
At the top is what i want, 2 btns with icons and labels.
At the bottom is what i get if
aButton.setSize(24);
it is NOT present (the default button.png stretches and is visible).
By forcing the size to 24 the ‘default’ img is hidden behind the real icon so this may be considered a work around.
The question is why the default button.png is inserted anyway and if I’m doing anything wrong.
One more q. pls, is it possible to place the label under the icon?
If you are looking for interactivity but no outline, then you are closer to a Button or ImgButton. Button uses CSS styles by default, based on the setting for baseStyle. You could establish a different style series that has no outline / gradient for the base state. See the skinning guide for further details.
It’s not a bug that an ImgButton actually appears as an image - that’s coming from the default setting for src.
I think it’s not clear for me in case of a ImgButton what’s the diff between setSrc and setIcon.
I was expecting setIcon to override any default image used by the button.
If i do setSrc=“” the default img doesn’t show up anymore but i see some warnings in the console. Can i ignore these warnings?
Thx for your help.