Home » Eclipse Projects » Remote Application Platform (RAP) » Popup behaviour for composite
Popup behaviour for composite [message #493439] |
Mon, 26 October 2009 05:26  |
Eclipse User |
|
|
|
Originally posted by: nlippke.t-online.de
Hi all,
I want my composite behave like a popup:
As long as the user interacts within this composite it should still be
visible. But this first time, the user clicks somewhere else it should
disappear.
I played a bit with the focus listener, but that does not do the trick.
The menu is a good example for this behaviour, but it uses a qooxdoo popup
class and I assume, that the logic is put somewhere in there.
Is it possible to simulated this behaviour in plain SWT? Or do I need a
popup on JS site? And if so can I put a composite within a popup?
Any advice?
Thanks,
Niels
|
|
| |
Re: Popup behaviour for composite [message #493452 is a reply to message #493441] |
Mon, 26 October 2009 06:50   |
Eclipse User |
|
|
|
Originally posted by: nlippke.t-online.de
Yes,
I opened a shell, put the composite inside. Furthermore I attached a
focuslistener on the shell to catch "focus lost events". Problem with this
approach:
The focus lost event is even fired, if a button inside the composite (in the
shell) is clicked. So I coded a check to see if any child control has the
focus and kept the shell visible. But once the shell looses its focus no
more events of those are fired. So if you click afterwards somewhere else in
the app, the shell doesn't notice hat and is still visible.
Niels
"Ivan Furnadjiev" <ivan@eclipsesource.com> schrieb im Newsbeitrag
news:hc3qb9$lb9$1@build.eclipse.org...
> Hi Niels,
>
> did you try to use Shell instead of Composite?
>
> Best,
> Ivan
>
> Niels Lippke wrote:
>> Hi all,
>>
>> I want my composite behave like a popup:
>> As long as the user interacts within this composite it should still be
>> visible. But this first time, the user clicks somewhere else it should
>> disappear.
>> I played a bit with the focus listener, but that does not do the trick.
>> The menu is a good example for this behaviour, but it uses a qooxdoo
>> popup class and I assume, that the logic is put somewhere in there.
>>
>> Is it possible to simulated this behaviour in plain SWT? Or do I need a
>> popup on JS site? And if so can I put a composite within a popup?
>>
>> Any advice?
>>
>> Thanks,
>>
>> Niels
|
|
|
Re: Popup behaviour for composite [message #493497 is a reply to message #493452] |
Mon, 26 October 2009 10:04   |
Eclipse User |
|
|
|
Hi Niels,
you can do this with ShellListener instead of FocusListener.
HTH,
Ivan
Niels Lippke wrote:
> Yes,
>
> I opened a shell, put the composite inside. Furthermore I attached a
> focuslistener on the shell to catch "focus lost events". Problem with
> this approach:
> The focus lost event is even fired, if a button inside the composite
> (in the shell) is clicked. So I coded a check to see if any child
> control has the focus and kept the shell visible. But once the shell
> looses its focus no more events of those are fired. So if you click
> afterwards somewhere else in the app, the shell doesn't notice hat and
> is still visible.
>
> Niels
>
> "Ivan Furnadjiev" <ivan@eclipsesource.com> schrieb im Newsbeitrag
> news:hc3qb9$lb9$1@build.eclipse.org...
>> Hi Niels,
>>
>> did you try to use Shell instead of Composite?
>>
>> Best,
>> Ivan
>>
>> Niels Lippke wrote:
>>> Hi all,
>>>
>>> I want my composite behave like a popup:
>>> As long as the user interacts within this composite it should still
>>> be visible. But this first time, the user clicks somewhere else it
>>> should disappear.
>>> I played a bit with the focus listener, but that does not do the trick.
>>> The menu is a good example for this behaviour, but it uses a qooxdoo
>>> popup class and I assume, that the logic is put somewhere in there.
>>>
>>> Is it possible to simulated this behaviour in plain SWT? Or do I
>>> need a popup on JS site? And if so can I put a composite within a
>>> popup?
>>>
>>> Any advice?
>>>
>>> Thanks,
>>>
>>> Niels
>
|
|
|
Re: Popup behaviour for composite [message #493515 is a reply to message #493497] |
Mon, 26 October 2009 11:14  |
Eclipse User |
|
|
|
Originally posted by: nlippke.t-online.de
:) Now that was easy.
TAL,
Niels
"Ivan Furnadjiev" <ivan@eclipsesource.com> schrieb im Newsbeitrag
news:hc4a9h$pe1$1@build.eclipse.org...
> Hi Niels,
>
> you can do this with ShellListener instead of FocusListener.
>
> HTH,
> Ivan
>
> Niels Lippke wrote:
>> Yes,
>>
>> I opened a shell, put the composite inside. Furthermore I attached a
>> focuslistener on the shell to catch "focus lost events". Problem with
>> this approach:
>> The focus lost event is even fired, if a button inside the composite (in
>> the shell) is clicked. So I coded a check to see if any child control has
>> the focus and kept the shell visible. But once the shell looses its focus
>> no more events of those are fired. So if you click afterwards somewhere
>> else in the app, the shell doesn't notice hat and is still visible.
>>
>> Niels
>>
>> "Ivan Furnadjiev" <ivan@eclipsesource.com> schrieb im Newsbeitrag
>> news:hc3qb9$lb9$1@build.eclipse.org...
>>> Hi Niels,
>>>
>>> did you try to use Shell instead of Composite?
>>>
>>> Best,
>>> Ivan
>>>
>>> Niels Lippke wrote:
>>>> Hi all,
>>>>
>>>> I want my composite behave like a popup:
>>>> As long as the user interacts within this composite it should still be
>>>> visible. But this first time, the user clicks somewhere else it should
>>>> disappear.
>>>> I played a bit with the focus listener, but that does not do the trick.
>>>> The menu is a good example for this behaviour, but it uses a qooxdoo
>>>> popup class and I assume, that the logic is put somewhere in there.
>>>>
>>>> Is it possible to simulated this behaviour in plain SWT? Or do I need a
>>>> popup on JS site? And if so can I put a composite within a popup?
>>>>
>>>> Any advice?
>>>>
>>>> Thanks,
>>>>
>>>> Niels
>>
|
|
|
Goto Forum:
Current Time: Thu Sep 25 18:23:03 EDT 2025
Powered by FUDForum. Page generated in 0.03883 seconds
|