EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: wade.zhu on August 04, 2014, 08:59:59 PM



Title: how can i style the textbox
Post by: wade.zhu 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?


Title: Re: how can i style the textbox
Post by: stworthy 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;
}


Title: Re: how can i style the textbox
Post by: pratikk 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 ?


Title: Re: how can i style the textbox
Post by: stworthy 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>


Title: Re: how can i style the textbox
Post by: Stefan B. on January 23, 2015, 12:03:59 AM
Thanks - that is also what we search  :D


Title: Re: how can i style the textbox
Post by: pratikk 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


Title: Re: how can i style the textbox
Post by: stworthy 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');


Title: Re: how can i style the textbox
Post by: pratikk 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.


Title: Re: how can i style the textbox
Post by: stworthy 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');