Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Customizing IconMenuButton

$
0
0
SmartClient Version: v10.0p_2015-05-03/LGPL Development Only (built 2015-05-03)

I am having trouble overriding the menu graphic in IconMenuButton.

I've created a derived class. At first I tried just calling setMenuIconSrc(). But this seems to assume that the dimensions of the image are 14x13. Since my image is 7x4 it gets stretched and becomes much larger and doesn't look right.

So then I thought that there might be an auto child for the menu icon so I tried the following:

Code:

Img menuIcon = new Img("[SKINIMG]Product/Menu/light/menu_button.png", 7, 4);
setAutoChildProperties("menuIcon", menuIcon);

This did nothing, the DOM generated still uses the standard graphic and dimensions.

Is there a way I can override the image being referenced AND the height and width of it?

Viewing all articles
Browse latest Browse all 4756

Trending Articles