Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to generate a pop-up window with an input text in SWT
How to generate a pop-up window with an input text in SWT [message #447305] Mon, 13 December 2004 14:26 Go to next message
Sam is currently offline SamFriend
Messages: 51
Registered: July 2009
Member
Could anyone help me with an example on how to generate a pop-up window
with an input text in SWT. I need to be able to read the value entered
into my application
Re: How to generate a pop-up window with an input text in SWT [message #447306 is a reply to message #447305] Mon, 13 December 2004 15:07 Go to previous messageGo to next message
Mani Ghamari is currently offline Mani GhamariFriend
Messages: 33
Registered: July 2009
Member
There is no built-in way of doing this in SWT as far as I know.
My suggestion would be to implement a popupmenu yourself:

- design a Dialog with the text field (MODAL);
- create, set the bounds, and show the dialog on MenuDetect events;
- dispose the dialog upon losing focus...

regards,

Mani

"Sam" <moo_the@yahoo.com> wrote in message
news:cpk8qi$7k2$1@www.eclipse.org...
> Could anyone help me with an example on how to generate a pop-up window
> with an input text in SWT. I need to be able to read the value entered
> into my application
>
Re: How to generate a pop-up window with an input text in SWT [message #447622 is a reply to message #447305] Wed, 15 December 2004 09:17 Go to previous message
Yves Harms is currently offline Yves HarmsFriend
Messages: 80
Registered: July 2009
Member
Sam wrote:
> Could anyone help me with an example on how to generate a pop-up window
> with an input text in SWT. I need to be able to read the value entered
> into my application
>

Take a look at org.eclipse.jface.dialogs.InputDialog
A short example use:

InputDialog d = new InputDialog(parentShell,
"your title",
"Please give me input ...",
"Default",
null);
d.open();
String result = d.getValue();
Previous Topic:Is there some visual design tool smaller than VE
Next Topic:Drag and drop of Composite instances
Goto Forum:
  


Current Time: Thu Oct 29 16:32:18 GMT 2020

Powered by FUDForum. Page generated in 0.01479 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top