View Full Version : Redmon menu
In a recent Tip of the Day you posted the basic code for the tabslider component. This was very helpful.
Do you have similar code for the Redmon Menu--such as is being used in the Contacts demo app? I could try and pull it apart from that, but would prefer to start from the basic simple code.
Thanks!
antun
02-06-2003, 04:11 PM
Actually, all of the menubar is in menu.lzx in the contacts directory, but here's the essence of it:-
<canvas debug="true">
<command id="cmd_apples" label="Apples"
onselect="debug.write('I like Apples');"
key="['Control','Shift','N']"/>
<window resizable="true">
<menubar width="immediateparent.width" height="25">
<menu label="Fruits" hasbutton="true" width="175">
<menuitem label="Apples" command="cmd_apples"/>
</menu>
</menubar>
</window>
</canvas>
-Antun
Antun,
Thanks for the snippet. Very helpful.
What I'm trying to figure out is how to run the menubar by itself (embeded in an HTML page).
Here's the code I tried:
<canvas>
<command id="cmd_apples" label="Homepage"
onselect="location.href='/statsapp/index.cfm';return false;" />
<menubar width="immediateparent.width" height="25" clickable="true">
<menu label="Homepage" hasbutton="true" width="175" />
<menu label="Enter Stats" hasbutton="true" width="175" />
<menu label="View Stats" hasbutton="true" width="175" />
</menubar>
</canvas>
But that throw's this error:
Compilation Warnings
basicMenu.lzx:9:77: element "menubar" from namespace "http://www.laszlosystems.com/2003/01/lzx"
not allowed in this context
I tried surrounding it with the WINDOW tag but that displayed the redmond window which is not what I want. I just want the menubar.
Thanks!
antun
02-06-2003, 05:41 PM
Hey jds
I'm getting that too. It's possible that there's a bug with the menubar component. The menubar does seem to work though. You won't get the compilation warnings if you do your own wrapper page.
As a rough really quick hack, I guess you could try overwriting the <window> class, so that it's just a view, and then put the <menubar> in that.
Take care,
Antun
I recommend ignoring the warning message for now. This will be fixed in the next release.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.