Re: [xwt-users] Dialog (message) boxes
Charles Goodwin <[email protected]>
| Newsgroups | gmane.comp.java.xwt.users |
|---|---|
| Organization | XWT Foundation |
| Message-ID | <[email protected]> |
Eric Merritt wrote:
> Sorry for another questions so quickly after my last.
> Would one of you point me in the right direction on
> how to do dialog boxes with xwt (the new widget set).
> I am afraid I am at a loss on this.
Unfortunately they are targetted for the next release of the widget set
and hence aren't there yet.
They are quite simple to create yourself. Create an xwt file:
<import name="xwt.widget" />
<template thisbox="frame" colour="#d4d0c8" hpad="20" vpad="20">
ok = $ok;
cancel = $cancel;
$ok._action = $cancel._action = function() { thisbox.Close = true; }
<button id="ok" text="OK" />
<box />
<button id="cancel" text="Cancel" />
</template>
Then from the window which pops up the dialogue:
var dialogue = xwt.newBox().apply( "path.to.dialogue" );
dialogue.ok._action = function() { ... }
dialogue.ok._cancel = function() { ... }
- Charlie