-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hey,
i build a application which use a panel to show content in a dashboard-style. Now i want to get rid of all the panel decoration (like border (easy) and headline (my problem)) if the user want so.
Has anyone an idea, how to remove (by java-code) the headline. Maybe with a special css-stlye...
Thanks
Try this below code which uses panel.setTitle(null);
to remove title and its related decoration
<zk>
<window apply="org.zkoss.support.forum.PanelStyleComposer">
<panel id="panel" title="Panel title" height="100px" width="200px" style="margin-bottom:10px" border="none" maximizable="true" collapsible="true" apply="">
<panelchildren>
<button id="btn" label="Remove title" onClick="panel.setTitle(null);"></button>
</panelchildren>
</panel>
</window>
</zk>
Asked: 2013-08-04 21:58:38 +0800
Seen: 44 times
Last updated: Aug 08 '13
what is this "headline" you are referring to?. So you want the panel title to display but no border? Can you post a image of what the final result you want?
ashishd ( 2013-08-05 09:04:57 +0800 )editi want to turn on/off the title (not just the text - the hole title); may be via css and 'height: 0px' ?!?
atori ( 2013-08-05 10:07:58 +0800 )editsorry, cannot post an image...: Karma < 100 ... working on that :-)
atori ( 2013-08-05 10:08:40 +0800 )editIf you don't set Panel component title then it won't show the title (i.e. the header of Panel component) so in short, to turn on call panel.setTitle("Some Title") and to turn off Panel.setTitle("") I guess. Have you tried this?
ashishd ( 2013-08-06 04:24:22 +0800 )edityes. but if if you do so, the headline-bar is still there - just without text. what i try to do is to eliminate the bar (maybe height=0) - i want to get rid of all panel decoration.
atori ( 2013-08-06 07:26:39 +0800 )edit