-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hallo all,
i will change the font-size from tabs with jave code because i render the font-size variabel about "onClientInfo" is fired.
in zul-File no problem with
<style> .z-tab-accordion-text { font-size: 20px; } </style>
please can everyone give me a java-sample.
Best Regards
Andi
report the bug:
http://sourceforge.net/tracker/?group_id=152762&atid=785191
if you need a solution for now, make a css class for each font-size.
like this:
tab-font6 span.z-tab-text {font-size: 6px}
tab-font7 span.z-tab-text {font-size: 7px}
tab-font8 span.z-tab-text {font-size: 8px}
...
and
Component.setSclass("tab-font" + (int) (deskHeight / 25));
it's dirty, but should work
the font style is set in the <li> tag, but i think it must be set in the <span> tag.
<li id="g4JQc" class="z-tab z-tab-seld" style="font-size: 20px;"> <div id="g4JQc-hl" class="z-tab-hl"> <div id="g4JQc-hr" class="z-tab-hr"> <div id="g4JQc-hm" class="z-tab-hm "> <span class="z-tab-text">TEST1</span> </div> </div> </div> </li>
hi,
the Component.setStyle("font-size: 20px;"); method work for other components e.g. a label.
I tested a tab and a label component with firebug and i think the style is set to a wrong html tag if tab is used.
so i think it is a bug.
<zk> <style dynamic="true"> .z-tab-accordion-text { color:blue; } </style> <tabbox id="tabbox" > <tabs> <tab id="tab1" label="Tab 1" /> <tab id="tab2" label="Tab 2" /> </tabs> <tabpanels> <tabpanel> <label value="Content for Tab #1"/> </tabpanel> <tabpanel> <label value="Content for Tab #2"/> </tabpanel> </tabpanels> </tabbox> </zk>
public void onClientInfo(ClientInfoEvent event) throws Exception { deskWidth = event.getDesktopWidth(); deskHeight = event.getDesktopHeight(); tab1.setStyle("font-size: " + Integer.toString((int) (deskHeight / 25)) + "px"); ... ... ...
Asked: 2011-05-04 15:05:38 +0800
Seen: 946 times
Last updated: May 16 '11