-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hello,
how to shown text in north title borderlayout, while is split ? Example I want to display the customer code.
i have code like this, but it did not work. this my code :
<?xml version="1.0" encoding="UTF-8"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" root="./win" ?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<zk xmlns="http://www.zkoss.org/2005/zul"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.zkoss.org/2005/zul
http://www.zkoss.org/2005/zul/zul.xsd">
<style>
</style>
<script>
<![CDATA[
jq("@west,@north,@east,@south").each(function(){
var zLayout = zk.Widget.$(this);
if(zLayout.$n("cap")!=null){
var word = jq(zLayout.$n("cap")).text();
zLayout.$n("colled").title = word ;
}
});
]]></script>
<window id="win" hflex="true" border="normal" sizable="true"
maximizable="true" apply="${PLANController}">
<tabbox id="tb" height="800px" >
<tabs id="tabs">
<tab/>
</tabs>
<tabpanels>
<tabpanel >
<panel framable="false" height="760px">
<panelchildren>
<borderlayout>
<west size="100%" border="0" splittable="true">
<grid height="750px">
<columns><column label=""/></columns>
<rows>
<row>
<borderlayout height="740px">
<north id="@north" title="Profile" maxsize="250" size="30%"
splittable="true" collapsible="true" >
<grid>
<columns> <column width="100px" /><column/> </columns>
<rows>
<row>
<div align="left">
<label value="Customer code"/>
</div>
<hbox>
<textbox id="txtCustCode" cols="5" />
<textbox id="txtCustName" cols="40" />
</hbox>
</row>
</rows>
</grid>
</north>
<center border="0">
</center>
</borderlayout>
</row>
</rows>
</grid>
</west>
</borderlayout>
</panelchildren>
</panel>
</tabpanel>
</tabpanels>
</tabbox>
</window>
</zk>
Thank you very much.
Unfortunately your code example mixes many things and your attempts show that you clearly don't understand the script you are trying to integrate.
So I cleaned up your layout in order to concentrate on what's relevant and also simplified script to apply the title to the "colled" region.
Here the example showing this in action: http://zkfiddle.org/sample/fr08p/1-set-collapsed-title-to-layout-region
Using this approach you can decide which north/south layout region should be affected. Whenever you apply the w:onBind listener the script will execute for only that widget and apply the title.
Robert
Asked: 2017-06-10 07:51:15 +0800
Seen: 21 times
Last updated: Jun 14 '17