[api-dev] Adding key event listener to complex toolbar control

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[api-dev] Adding key event listener to complex toolbar control

muddybeemer
Hello,

I have created an EditField control for a writer AddOn toolbar based on the
information in the wiki page:

http://wiki.services.openoffice.org/wiki/Framework/Article/Generic_UNO_Interfaces_for_complex_toolbar_controls

I have been able to send a ControlCommand using the control's
XStatusListener, and get control events using
XControlNotificationListener.controlEvent method, all according to the
documentation.  The control works as expected - I can set the text, and get
the edited text, and know if the control is activated by hitting "enter".

I would like to know if the user presses "esc" key while editing the
EditField.  I have searched for a way to attach a key event listener to the
control, but no luck.  Can you point me in the right direction?  For
instance, can I get an XWindow or XController interface for the control?

Kind Regards,

Toby
Reply | Threaded
Open this post in threaded view
|

Re: [api-dev] Adding key event listener to complex toolbar control

Carsten Driesner
muddybeemer wrote:

> Hello,
>
> I have created an EditField control for a writer AddOn toolbar based on the
> information in the wiki page:
>
> http://wiki.services.openoffice.org/wiki/Framework/Article/Generic_UNO_Interfaces_for_complex_toolbar_controls
>
> I have been able to send a ControlCommand using the control's
> XStatusListener, and get control events using
> XControlNotificationListener.controlEvent method, all according to the
> documentation.  The control works as expected - I can set the text, and get
> the edited text, and know if the control is activated by hitting "enter".
>
> I would like to know if the user presses "esc" key while editing the
> EditField.  I have searched for a way to attach a key event listener to the
> control, but no luck.  Can you point me in the right direction?  For
> instance, can I get an XWindow or XController interface for the control?
>  
Hi Toby,

I am sorry but there is no way to get a reference to the control.
Fortunately the complex toolbar controls feature is very flexible and
can be enhanced easily. Therefore if you need a key listener please
write a request for an enhancement and set the owner to me (cd).

Regards,
Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [api-dev] Adding key event listener to complex toolbar control

muddybeemer
On Tue, Apr 27, 2010 at 4:20 AM, Carsten Driesner
<[hidden email]>wrote:

> muddybeemer wrote:
>
>> Hello,
>>
>> I have created an EditField control for a writer AddOn toolbar based on
>> the
>> information in the wiki page:
>>
>>
>> http://wiki.services.openoffice.org/wiki/Framework/Article/Generic_UNO_Interfaces_for_complex_toolbar_controls
>>
>> I have been able to send a ControlCommand using the control's
>> XStatusListener, and get control events using
>> XControlNotificationListener.controlEvent method, all according to the
>> documentation.  The control works as expected - I can set the text, and
>> get
>> the edited text, and know if the control is activated by hitting "enter".
>>
>> I would like to know if the user presses "esc" key while editing the
>> EditField.  I have searched for a way to attach a key event listener to
>> the
>> control, but no luck.  Can you point me in the right direction?  For
>> instance, can I get an XWindow or XController interface for the control?
>>
>>
> Hi Toby,
>
> I am sorry but there is no way to get a reference to the control.
> Fortunately the complex toolbar controls feature is very flexible and can be
> enhanced easily. Therefore if you need a key listener please write a request
> for an enhancement and set the owner to me (cd).
>
> Regards,
> Carsten
>

Done.  I also requested a "SetFocus" ControlCommand.

The OpenOffice.org API is terrific.  I appreciate all your hard work.

Regards,
Toby
Reply | Threaded
Open this post in threaded view
|

Re: [api-dev] Adding key event listener to complex toolbar control

othmanelmoulat
This post has NOT been accepted by the mailing list yet.
Hi,
I wonder if it is possible to add another complex toolbar control FixedText. which behaves like a label as the XFixedText from OO GUI API.
is there such control?

thanks