Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Custom Widget in Drop Down Menu
Custom Widget in Drop Down Menu [message #444142] Thu, 07 October 2004 14:58 Go to next message
Eclipse UserFriend
Originally posted by: luislobo.evolvenet.pt

Hi!

Is there any way of creating a drop down menu which contains a widget and
not only text, something like a TableViewer (for instance).
It may seem a little strange, but I need it to create a calendar button,
something like the one that pops up in KDE/Windows when you click the
clock.
I am using SWT 3.0.1.

Thanks in advance,
LL
Re: Custom Widget in Drop Down Menu [message #444199 is a reply to message #444142] Fri, 08 October 2004 14:42 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Nope. Menus are not native controls on some operating systems (Windows) and
therefore cannot be treated as such. On Windows, the operating system calls
that resize and position controls for example will not work on menus. This
is the main reason that menus are modeled the way they are in SWT.

"Lu
Re: Custom Widget in Drop Down Menu [message #444213 is a reply to message #444199] Fri, 08 October 2004 17:56 Go to previous messageGo to next message
Paul Singleton is currently offline Paul SingletonFriend
Messages: 37
Registered: July 2009
Member
Steve Northover wrote:

> Nope. Menus are not native controls on some operating systems (Windows) and
> therefore cannot be treated as such. On Windows, the operating system calls
> that resize and position controls for example will not work on menus. This
> is the main reason that menus are modeled the way they are in SWT.

And presumably there's no way to show a dialog with
the modality of a menu, so that it disappears when
something else gets focus etc.?

Paul Singleton
Re: Custom Widget in Drop Down Menu [message #444236 is a reply to message #444213] Sat, 09 October 2004 21:21 Go to previous messageGo to next message
Chris Gross is currently offline Chris GrossFriend
Messages: 471
Registered: July 2009
Senior Member
Sure, just not inside a menu. Just code a focus listener and close your
shell when it loses focus.

-Chris

"Paul Singleton" <paul@jbgb.com> wrote in message
news:ck6k36$fst$1@eclipse.org...
> Steve Northover wrote:
>
>> Nope. Menus are not native controls on some operating systems (Windows)
>> and
>> therefore cannot be treated as such. On Windows, the operating system
>> calls
>> that resize and position controls for example will not work on menus.
>> This
>> is the main reason that menus are modeled the way they are in SWT.
>
> And presumably there's no way to show a dialog with
> the modality of a menu, so that it disappears when
> something else gets focus etc.?
>
> Paul Singleton
Re: Custom Widget in Drop Down Menu [message #444457 is a reply to message #444236] Wed, 13 October 2004 11:37 Go to previous message
Paul Singleton is currently offline Paul SingletonFriend
Messages: 37
Registered: July 2009
Member
Many thanks for the encouraging tip; before I have a go,
has anyone else emulated popup menus like this? I'm not
sure about cross platform issues; in Windows, Esc also
cancels a popup, and I don't know about other platforms.
I'd like to do it properly...

Paul Singleton

Chris wrote:

> Sure, just not inside a menu. Just code a focus listener and close your
> shell when it loses focus.

> "Paul Singleton" <paul@jbgb.com> wrote:

>>And presumably there's no way to show a dialog with
>>the modality of a menu, so that it disappears when
>>something else gets focus etc.?
Previous Topic:Double click event in "Combo"
Next Topic:Table column wrapping
Goto Forum:
  


Current Time: Sun Nov 29 05:53:55 GMT 2020

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

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

Back to the top