0

bar (grid) located at the bottom of the browser

asked 2009-12-03 15:31:07 +0800

ErayGursoy gravatar image ErayGursoy
34 1

Hello all,

I am preparing a layout with a top menu and a bar at the bottom.
I have tried many things but failed to set good layout.

<borderlayout>
<north>
<grid> <!-- GRID 1 (should be at the top)-->
.....
</grid>
</north>
<south>
<grid > <!-- GRID 2 (should be at the bottom)-->
.....
</grid>
</south>
</borderlayout>


this looks like what i need but if i dont set height property borderlayout shows nothing.
If I set the height="100%" it still shows nothing.
But if I set height="500px" it works within the 500px window.
How can I fix grid2 at the bottom without defining a fixed size? (client browser may resize)
I tried vflex it does not work too. (I may miss something, any suggestions will be welcomed)
Thanks,
Eray

delete flag offensive retag edit

7 Replies

Sort by ยป oldest newest

answered 2009-12-03 16:06:17 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

do you mean a thing like a statusBar? like here in the aplication

link publish delete flag offensive edit

answered 2009-12-04 03:23:54 +0800

ErayGursoy gravatar image ErayGursoy
34 1

That is definitely the layout I need.
Is it open-source?
Can I have layout code?

link publish delete flag offensive edit

answered 2009-12-04 10:53:13 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2009-12-04 10:53:48 +0800

The whole app sources are free to use. Look here.

best
Stephan

<?page id="indexPage" title=" ZKoss sample application " cacheable="false" 
	language="xul/html" zscriptLanguage="Java"?>
<?meta content="text/html; charset=UTF-8" 	pageEncoding="UTF-8"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<?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">

	<window id="outerIndexWindow" apply="${indexCtrl}" border="none"
		width="100%" height="100%">

		<style>
			body { padding: 0 0; /* 0 padding on top and bottom and 0
			padding on right and left */ }
		</style>

		<!-- hidden fields for the current desktop height and width -->
		<intbox id="currentDesktopHeight" visible="false" />
		<intbox id="currentDesktopWidth" visible="false" />
		<checkbox id="CBtreeMenu" checked="true" visible="false" />

		<borderlayout id="borderlayoutMain" height="100%">
			<north id="borderlayoutMainNorth" border="none"
				splittable="false">

				<div id="div1" style="background-color:#4944F9">
					<hbox width="100%">
						<h:div id="divNo" align="left">
							<image src="/images/zkoss3.gif" />
						</h:div>

						<h:div id="divNorth" align="left"
							style="padding:5px">
							<label
								style="color:white; font-size:12px; font-weight:bold"
								value="ZKoss Sample Application ( ZK + Spring + Spring-Security + Hibernate + JasperReports )">
							</label>
						</h:div>

						<h:div id="divNorthEast" align="right">
							<button id="btnLogout"
								image="/images/icons/exit_door_16x16.gif"
								label="${c:l('btnLogout.label')}"
								tooltiptext="${c:l('btnLogout.tooltiptext')}" />
							<!-- href="/index.zul"  -->
						</h:div>
					</hbox>
					<separator bar="true"
						style="background-color:silver" />

					<div id="divDropDownMenu" width="100%">
						<menubar id="mainMenuBar" height="25px"></menubar>
					</div>

				</div>
			</north>


			<west border="none" margins="0,0,0,0" size="200px"
				flex="true" minsize="10" splittable="true" autoscroll="false">
				<div id="divWest">WEST</div>
			</west>
			<center border="none" margins="0,0,0,0" flex="true">
				<div id="divCenter">CENTER</div>
			</center>
			<east border="none" margins="0,0,0,0" size="0%">
				<div id="divEast">EAST</div>
			</east>

			<south border="none" margins="1,0,0,0" height="20px"
				splittable="false" flex="true">
				<div id="divSouth">

					<grid id="statusBarGrid" fixedLayout="true"
						height="20px" width="100%">
						<columns sizable="false">
							<column label="User:" width="10%" />
							<column id="statusBarColUser" label=""
								width="10%" />
							<column label="Office-No.:" width="10%" />
							<column id="statusBarColOfficeNo" label=""
								width="10%" />
							<column label="Status" width="10%" />
							<column id="statusBarColStatus" label=""
								width="10%" />
							<column label="ZK Version" width="10%" />
							<column id="statusBarAppVersion" label=""
								width="20%" />
							<column id="colDate" width="20%"
								align="right" />
						</columns>
					</grid>
				</div>

			</south>
		</borderlayout>

		<label id="lbl2" width="33%" />
		<timer id="timer2" delay="1000" repeats="true">
			<attribute name="onTimer">
	Locale locale = org.zkoss.util.Locales.getCurrent();
	java.text.DateFormat dateFormat = java.text.DateFormat.getDateTimeInstance(
			java.text.DateFormat.MEDIUM, java.text.DateFormat.MEDIUM, locale);
	String strTime = dateFormat.format(java.util.Calendar.getInstance(locale).getTime());
	colDate.setLabel(strTime);
</attribute>
		</timer>

	</window>

</zk>


link publish delete flag offensive edit

answered 2009-12-04 16:01:18 +0800

ErayGursoy gravatar image ErayGursoy
34 1

Terry thank you very much.
It was a lot to me.
outerIndexWindow did the trick.
After putting my borderlayout in an 100% height window it worked.

yours,
Eray

link publish delete flag offensive edit

answered 2009-12-07 07:15:36 +0800

jhuber gravatar image jhuber
192 1 4

updated 2009-12-07 07:44:29 +0800

I'm having the same problem. But in my case I have windows inside a window.

<window>
 <borderlayout>
   ......
     <center>
       <div>
         <window>
             ....
         </window>
         <window>
           ....
         </window>
       </div>
    </center>
    .... 
</window>

I gave them all width with percentage, but it will not show the complete window like ErayGursoy said it's only showing the window by defining a fixed size with px.

What can I do without defining a fixed size?

link publish delete flag offensive edit

answered 2009-12-07 09:21:14 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Window is a container. I recommend Panels instead of your inner windows. And/Or Tablelayouts, Grids

link publish delete flag offensive edit

answered 2009-12-07 09:27:10 +0800

jhuber gravatar image jhuber
192 1 4

ah ok...
I thought It's also working with windows

sorry for that :)

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-12-03 15:31:07 +0800

Seen: 739 times

Last updated: Dec 07 '09

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