How to load and show a dialog from the res file created with the designer?

44 views
Skip to first unread message

eos

unread,
Sep 2, 2013, 10:08:23 AM9/2/13
to codenameone...@googlegroups.com
One can show a dialog thusly:

Dialog.show("Title", "message", "OK", null);

But this doesn't return a Dialog handle, or allow a timeout.

I need the same dialog, but with either a timeout, or a way to programatically close it after a period of time.

I have created the equivalent Dialog as a new GUI item in the Designer, but the Developers Guide does not mention how to use it, and the examples I have found use commands from other GUI items to launch them.

Anyone got a code snippet?

I'm actually trying to create something which looks like a notification.

Thanks!

Shai Almog

unread,
Sep 2, 2013, 12:08:46 PM9/2/13
to codenameone...@googlegroups.com
showForm will work for a dialog too.

You have many permutations for the static show method e.g.:
Dialog.show(title, text, 0, null, okText, cancelText, timeoutInMillis);


Reply all
Reply to author
Forward
0 new messages