EasyUI Forum
March 28, 2024, 03:07:02 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [SOLVED] resizing font and height of a textbox  (Read 12269 times)
korenanzo
Full Member
***
Posts: 145


View Profile
« on: January 15, 2016, 01:38:58 AM »

Hi,

I need to resize the textbox, according to the font size.

I am able so resize the font, using
 
Code:
$('#a').textbox('textbox').css('font-size', '24px');
but the height of the whole textbox does not change. Huh

http://jsfiddle.net/korenanzo/6hwwbptq/2/

thanks,
RIc
« Last Edit: January 19, 2016, 02:17:41 AM by korenanzo » Logged

-- Licensed User --

www.kitelabs.it
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 15, 2016, 08:36:44 AM »

Please try this:
http://jsfiddle.net/6hwwbptq/3/
Logged
korenanzo
Full Member
***
Posts: 145


View Profile
« Reply #2 on: January 18, 2016, 01:46:00 AM »

ok,

but I'd like to change the whole  field size, setting only the font size.

It is  the same behaviour offered by the standard input field (that is: when I change the font-size, the whole textfield changes)

try this,

http://jsfiddle.net/korenanzo/6hwwbptq/7/

put 8 or 34 in the number field  and see the different behaviours of the two objects


thanks,

RIc
Logged

-- Licensed User --

www.kitelabs.it
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: January 18, 2016, 06:32:23 PM »

To auto resize the textbox height, please set 'height' property to to 'auto'.
Code:
$('#a').numberbox({
   width: '70%',
   height: 'auto',
});

http://jsfiddle.net/6hwwbptq/9/
Logged
korenanzo
Full Member
***
Posts: 145


View Profile
« Reply #4 on: January 19, 2016, 02:16:39 AM »

thanks !
Logged

-- Licensed User --

www.kitelabs.it
jega
Full Member
***
Posts: 190


View Profile
« Reply #5 on: November 15, 2021, 03:40:08 AM »

Was looking for the same

Tried the fiddle sample from stworthy with size 64. The easyui numberbox does not change height.

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!