EasyUI Forum
May 19, 2024, 04:12:17 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: multiline textbox sizes  (Read 7235 times)
korenanzo
Guest
« on: November 11, 2014, 08:32:17 AM »

Hi,
I'd like to know if it is possible to set the width and height of a multiline textbox according to the "rows" and "cols" properties of the inner <textarea>

This does not work
<input type=text id="t">
$('#t').textbox({
multiline:true,
cols:40,
rows:5
})

neither this:
$('#t').textbox('textbox').attr('cols',40).attrs('rows',5)

The former discards the rows and cols parameter, the  latter actually sets the textarea attributes but the textbox'size is left unchanged.

Thanks,
ric
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 11, 2014, 08:46:07 AM »

Please try the code below:
Code:
$('#t').textbox({multiline:true}).textbox('textbox').attr('rows',5).attr('cols',40).css({
width:'',
height:''
}).parent().css({
width:'',
height:''
})
Logged
korenanzo
Guest
« Reply #2 on: November 11, 2014, 09:08:53 AM »

got it

not quite intuitive, but it works Smiley
Thanks,
RIc
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!