[Laszlo-user] clone a window
Elliot Winard
ewinard at laszlosystems.com
Thu Apr 26 18:32:43 PDT 2007
You should declare the window as a class and then create multiple
instances of it -
<class name="TyWindowClass" x="50" y="50"
width="${imageLoad.width+imageLoad.width*0.20}" ...>
<menubar name="mbar" placement="menubar">
<menu name="file" id="mfile" width="80">File
<menuitem text="Spawn"/>
<menuitem text="Store"/>
. . .
</class>
<TyWindow id="w1"/>
<TyWindow id="other1" />
This isn't "cloning" but may be what you're looking for.
-Elliot
On Thu, Apr 26, 2007 at 9:01 PM, Tyler Frieling wrote:
hi,
Is there a way to clone an existing window instance? I tried a "new
window(canvas, idofwindowtoclone)" but it resulted in a window with
just the same title.
Ideally if I have this:
<window id="w1" x="50" y="50"
width="${imageLoad.width+imageLoad.width*0.20}"
height="${imageLoad.width+imageLoad.width*0.20}" title="Log in data"
resizable="true" closeable="true" layout="axis:x; spacing:20;
inset:20">
<menubar name="mbar" placement="menubar">
<menu name="file" id="mfile" width="80">File
<menuitem text="Spawn"/>
<menuitem text="Store"/>
<menuitem text="Remove"/>
<menuseparator/>
<menuitem id="MWS" text="Send">
<menu name="subedit">subedit
<menuitem text="Email"/>
<menuitem text="Print"/>
</menu>
</menuitem>
</menu>
.........</window>
I would like the same window but with a different id:
<window id="clonew1" x="50" y="50"
width="${imageLoad.width+imageLoad.width*0.20}"
height="${imageLoad.width+imageLoad.width*0.20}" title="Log in data"
resizable="true" closeable="true" layout="axis:x; spacing:20;
inset:20">
<menubar name="mbar" placement="menubar">
<menu name="file" id="mfile" width="80">File
<menuitem text="Spawn"/>
<menuitem text="Store"/>
<menuitem text="Remove"/>
<menuseparator/>
<menuitem id="MWS" text="Send">
<menu name="subedit">subedit
<menuitem text="Email"/>
<menuitem text="Print"/>
</menu>
</menuitem>
</menu> .........</window>
tyler
---=---===-------
Elliot Winard
Sr. Software Engineer
Laszlo Studios
---=---===-------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20070426/40b93e02/attachment-0001.html
More information about the Laszlo-user
mailing list