EasyUI Forum
May 12, 2024, 05:00:54 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: how can i style the textbox  (Read 27726 times)
wade.zhu
Newbie
*
Posts: 27


View Profile
« on: August 04, 2014, 08:59:59 PM »

before v1.4, i could align the validatebox/numberbox text using style="text-align:right;color:red;font-size:large;"
now i have to code .textbox('textbox').css('text-align', 'right') after component parsed
i read the document, only 'iconAlign', 'buttonAlign' properties found, no 'textAlign' or something else property found.

i have lots of textbox to custom style, what should i do if i upgrade to v1.4?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 04, 2014, 10:30:18 PM »

Please override the '.textbox-text' CSS class to customize your own style.
Code:
.textbox-text{
  text-align: right;
  color: red;
}
Logged
pratikk
Newbie
*
Posts: 49


View Profile Email
« Reply #2 on: January 19, 2015, 11:18:44 PM »

this aligns the combos also. I want combogrids left aligned and numberboxes right aligned. Can you give me an advice ?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: January 19, 2015, 11:57:23 PM »

Try code below instead to right align the numberbox components.
Code:
<style>
.numberbox .textbox-text{
  text-align: right;
  color: red;
}
</style>
Logged
Stefan B.
Full Member
***
Posts: 152


Software Architekt


View Profile Email
« Reply #4 on: January 23, 2015, 12:03:59 AM »

Thanks - that is also what we search  Cheesy
Logged
pratikk
Newbie
*
Posts: 49


View Profile Email
« Reply #5 on: May 14, 2015, 02:59:58 AM »

    .numberbox .textbox-text {
            text-align: right;
        }

This aligns ALL of the numberboxes. İf I have specific numberbox how will I do it ?

I tried

#xxid .textbox-text {
     font-size: 24px;
{

But didn't worked
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #6 on: May 14, 2015, 07:41:07 AM »

Using javascript also can set the alignment of the numberbox component.
Code:
$('#xxxid').numberbox('textbox').css('text-align','right');
Logged
pratikk
Newbie
*
Posts: 49


View Profile Email
« Reply #7 on: May 17, 2015, 03:43:28 AM »

In combogrid I adjusted the font size with the code you have given.

Now I want to ask if there is a solution for the drop down list. Because this time drop down list  header and list font size stays as it is.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #8 on: May 17, 2015, 06:09:30 PM »

To custom the combogrid font size, please define a special CSS class.
Code:
<style>
.textbox .mc,
.mc .datagrid-cell,
.mc .datagrid-cell span{
font-size: 14px;
}
</style>

And then apply the '.mc' class to the combogrid.
Code:
var cc = $('#Company');
cc.combogrid('textbox').addClass('mc');
cc.combogrid('grid').datagrid('getPanel').addClass('mc');
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!