View Full Version : Window status bar access?
wcwilson
01-23-2003, 01:55 PM
In the contacts sample app the window has a bar across the bottom which in other windows apps can be used for status text. In contacts.lzx I don't see this referenced so I assume that this is a standard component (in Redmond) that is shown because the window is resizable. Can I reference that object somehow so I can set some text there?
Thanks,
--Wayne
antun
01-23-2003, 02:18 PM
Hey Wayne
This should get you started. You'll probably need to nest the text tag within views to get the right spacing, or maybe there's another way...
<canvas debug="true">
<window resizeable="true" id="myWin">
<text placement="fixedpanel">Hello World!</text>
</window>
</canvas>
Now for the interesting bit. Where did I dig up fixedpanel? Run the above app, then using the debugger, type:-
myWin
Since it finds a view called myWin (global, because it's referenced with an id), it will tell you it found a LzView.
Then try typing in:
myWin.subviews
Next try:
myWin.bottom.subviews
Neat, eh?
-Antun
make that attribute "resizable", not "resizeable" ...
wcwilson
01-23-2003, 03:58 PM
Thanks again, that worked well. Here is my statusbar (adjusted down to center text that I set elsewhere):
<text placement="fixedpanel" name="statusbar" y="6" width="98"/>
You notice I set the width. I did so because anything larger than that will move the divider over to the right (good) but the text will leave a big white space behind it (bad). I guess with the name "fixed panel" it is not supposed to expand... Now I would actually like to get ahold of the panel to its right.
Is there any doc that has all these subviews listed so that I can use them in placement without going into debug? That is actually a question in general. While the docs show all the attributes that can be set for a particular, I don't know what all the legal values are.
--Wayne
antun
01-24-2003, 04:01 PM
You know that you can say:
<view width="immediateparent.width" />
As for the docs, we don't really plan to have docs that list out each views subviews. However you can look at the source code for components (it's in $webappfolder/WEB-INF/lps/components/redmond/), but the Redmond components are not yet updated to use current LZX code (they were built a while back). If you look at the code for the Debugger, you'll get a better idea of how a Laszlo component is actually just some LZX code.
-Antun
antun
01-24-2003, 04:38 PM
I get compilation warnings with "resizable" on B2.
-Antun
Originally posted by hqm
make that attribute "resizable", not "resizeable" ...
Oh, it must have changed for the next release. Is that in the release notes?
Originally posted by wcwilson
Here is my statusbar (adjusted down to center text that I set elsewhere):
<text placement="fixedpanel" name="statusbar" y="6" width="98"/>
--Wayne
did you put it inside the <window> tag or in the window class (under the bottom view)? i tried to put it in the <window> tag (with: placement="fixedpanel", placement="bottom.fixedpanel",...), but it dosnt work, the text goes to the title bar.
thanks
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.