EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: korenanzo on January 28, 2016, 02:48:42 AM



Title: images of any size in linkbutton
Post by: korenanzo on January 28, 2016, 02:48:42 AM
Hi all,

is it possible to put an image  into a linkbutton without constraint it at 16x16 pixel?

may be using another property instead of iconCls


thanks, Ric


Title: Re: images of any size in linkbutton
Post by: jarry on January 28, 2016, 07:36:08 PM
You can set the 'size' property to 'large' to get the large image button.

http://www.jeasyui.com/demo/main/index.php?plugin=LinkButton&theme=default&dir=ltr&pitem=LinkButton%20Size

You also can custom the image and the text on the button.
Code:
var img = '<img src="..." style="width:32px;height:32px;vertical-align:top">';
var txt = '<span style="line-height:32px">Text</span>';
$('#b1').linkbutton({
    text: img+txt
})


Title: Re: images of any size in linkbutton
Post by: korenanzo on February 08, 2016, 10:39:42 AM
Thanks jarry,

I am trying it but have some alignment problems:
how can I have the image centered in the button?

http://jsfiddle.net/teff1wns/10/


Title: Re: images of any size in linkbutton
Post by: jarry on February 08, 2016, 05:31:09 PM
Please set 'width' property to 'auto'.

http://jsfiddle.net/teff1wns/11/


Title: Re: images of any size in linkbutton
Post by: korenanzo on February 09, 2016, 12:54:24 AM
got it !
 
it works, thanks :)