[CLOSED] How to dynamically modify ext.net component font-size ?
Hi guys,
I want to dynamically modify the font size of controls I use (for example button, panel title, label, tabpanel title ...).
The information of the size is loaded from the database. I'm first trying with the button component
Test.aspx
Code:
<style type="text/css">
.small
{
font-size:8px;
}
.average
{
font-size:20px;
}
.big
{
font-size:50px;
}
</style>
<script type="text/javascript" language="javascript">
function Test() {
var b = Ext.getCmp('ButtonLancer');
b.removeCls("big");
b.addCls("small");
}
</script>
<ext:Button runat="server" ID="ButtonLancer" Cls="big" Text="Title 1" TextAlign="Center" Width="400" Height="30">
<Listeners>
<Click Fn="Test" />
</Listeners>
</ext:Button>
Nothing happen to my button font-size.
But if I modify my css by adding .x-btn-inner, it works fine :
Code:
.small .x-btn-inner
{
font-size:8px;
}
.average .x-btn-inner
{
font-size:20px;
}
.big .x-btn-inner
{
font-size:50px;
}
Now my questions are : is it the beest way ? how can I do with others controls like panel, label, Treepanel ? Is there a word like x-btn-inner for all of them if yes what are these words ?