0

portallayout problem?

asked 2009-09-29 02:58:31 +0800

cryandaguo gravatar image cryandaguo
72 2

the panel in portallayout can be maximized, but the maximize is only that full fill the column in Portal. is there any posiable to made the panel be full screen when maximized?
testing code is below:


<portallayout>
<portalchildren style="padding: 5px" width="30%">
<panel height="150px" title="Google Tools" border="normal" collapsible="true" closable="true" maximizable="true" style="margin-bottom:10px">
<panelchildren>
<iframe width="100%" height="100%" src="http://www.google.com"/>
</panelchildren>
</panel>
<panel height="300px" title="LabPixies Clock" border="normal" collapsible="true" closable="true" maximizable="true" style="margin-bottom:10px">
<panelchildren>
<iframe width="100%" height="100%" src="http://www.google.com"/>
</panelchildren>
</panel>
</portalchildren>

<portalchildren style="padding: 5px" width="30%">
<panel height="300px" title="ToDo" border="normal" collapsible="true" closable="true" maximizable="true" style="margin-bottom:10px">
<panelchildren>
<iframe width="100%" height="100%" src="http://www.google.com"/>
</panelchildren>
</panel>
</portalchildren>

<portalchildren style="padding: 5px" width="40%">
<panel height="400px" title="Trio" border="normal" collapsible="true" closable="true" maximizable="true" style="margin-bottom:10px">
<panelchildren>
<iframe width="100%" height="100%" src="http://www.google.com"/>
</panelchildren>
</panel>
</portalchildren>
</portallayout>

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2009-09-29 11:51:20 +0800

martin79 gravatar image martin79
96

You have to write your own maximize button, since the standard maximize would ruin the portalchildren structure.

For example:
You have 3 portallayout-columns (the portalchildren) each with a 250px width... what do you think the portal Layout should do? Mix all columns together to get one wide portalchildren?
You see, the only way to achieve this is to write your own behavior.

link publish delete flag offensive edit

answered 2009-10-03 15:31:03 +0800

cryandaguo gravatar image cryandaguo
72 2

@martin79
thanks for your help!
but How to write my own maximize button,
do you have any ideas or examples to describe how to add a custom event in an existed zk component, or change a existed zk default event?
any ideas would be very appreciated

link publish delete flag offensive edit

answered 2009-10-06 00:45:25 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

updated 2009-10-06 00:45:53 +0800

Hi,cryandaguo
you can change the width of other portalchildren when maximizable

<zk>
<zscript><![CDATA[
	void doMax() {
		p1.width="100%";
		p2.width="0%";
		p3.width="0%";
	}
]]></zscript>

	<portallayout>
		<portalchildren id="p1" style="padding: 5px" width="30%">
			<panel height="150px" title="Google Tools" border="normal"
				collapsible="true" closable="true" maximizable="true"
				style="margin-bottom:10px" onMaximize="doMax()">
				<panelchildren>
					<iframe width="100%" height="100%"
						src="http://www.google.com" />
				</panelchildren>
			</panel>
			<panel height="300px" title="LabPixies Clock"
				border="normal" collapsible="true" closable="true"
				maximizable="true" style="margin-bottom:10px">
				<panelchildren>
					<iframe width="100%" height="100%"
						src="http://www.google.com" />
				</panelchildren>
			</panel>
		</portalchildren>

		<portalchildren id="p2" style="padding: 5px" width="30%">
			<panel height="300px" title="ToDo" border="normal"
				collapsible="true" closable="true" maximizable="true"
				style="margin-bottom:10px">
				<panelchildren>
					<iframe width="100%" height="100%"
						src="http://www.google.com" />
				</panelchildren>
			</panel>
		</portalchildren>

		<portalchildren id="p3" style="padding: 5px" width="40%">
			<panel height="400px" title="Trio" border="normal"
				collapsible="true" closable="true" maximizable="true"
				style="margin-bottom:10px">
				<panelchildren>
					<iframe width="100%" height="100%"
						src="http://www.google.com" />
				</panelchildren>
			</panel>
		</portalchildren>
	</portallayout>

//jimmy

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-09-29 02:58:31 +0800

Seen: 197 times

Last updated: Oct 06 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More