Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT.Show not called for child widgets?
SWT.Show not called for child widgets? [message #533779] Sun, 16 May 2010 23:49 Go to next message
Misha Koshelev is currently offline Misha KoshelevFriend
Messages: 31
Registered: May 2010
Member
Dear All:

Just wondering if for a Text item, for example, there is a good event like SWT.Create that one could use (obviously SWT.Create does not exist).

SWT.Show would be nice, and I use it for shells, but it seems to _never_ be called for Text widgets (or MenuItem widgets for that matter) on GTK 64-bit Linux

Thank you!
Misha
Re: SWT.Show not called for child widgets? [message #533915 is a reply to message #533779] Mon, 17 May 2010 13:13 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Misha Koshelev wrote:
> Dear All:
>
> Just wondering if for a Text item, for example, there is a good event
> like SWT.Create that one could use (obviously SWT.Create does not exist).

What are you trying to do, exactly? I mean, what usecase are you trying
to fulfill?

SWT.Show applies to Menus, not MenuItems or most other widgets.

In 3.6 there is an event that is called during the create lifecycle, but
it is also called during many other points in the lifecycle.

What about SWT.Activate on your text field, or SWT.FocusIn?

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: SWT.Show not called for child widgets? [message #533952 is a reply to message #533915] Mon, 17 May 2010 14:39 Go to previous messageGo to next message
Misha Koshelev is currently offline Misha KoshelevFriend
Messages: 31
Registered: May 2010
Member
Thank you. I was looking for a convenient listener in which I could set the default value (retrieved from properties) of the Widget.

I have ended up going with SWT.Show on the parent shell.

Please let me know if you have better ideas (I am thinking that the SWT.Activate and FocusIn events do _not_ get called until the user actually activates the control - which would not be the correct time for my purposes - please correct me if I am wrong).

Thank you
Misha
Re: SWT.Show not called for child widgets? [message #534159 is a reply to message #533952] Tue, 18 May 2010 09:05 Go to previous messageGo to next message
Praveen  is currently offline Praveen Friend
Messages: 86
Registered: July 2009
Member
There are couple of ways for achieving this. During the SWT.Show event
of the shell, try to get the children of the shell and set it's default
properties.
Otherwise, you can consider SWT.Resize event for each widget, which
would be triggered when the widget is resized. Note that if the shell is
resized due to which if the widget is resized, then this event is
triggered again. So, you should use flags to check for the occurrence of
the event again.
I couldn't recollect any more better ideas at this moment.
Re: SWT.Show not called for child widgets? [message #534397 is a reply to message #534159] Wed, 19 May 2010 01:32 Go to previous message
Misha Koshelev is currently offline Misha KoshelevFriend
Messages: 31
Registered: May 2010
Member
Thank you so much for your helpful advice.

Misha
Previous Topic:How to repair canvas?
Next Topic:How to print a whole big Tree widget
Goto Forum:
  


Current Time: Fri Aug 23 13:08:51 GMT 2019

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

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

Back to the top