Hi Carstern,
I have seen in developers guide as

A context menu is displayed when an object is right clicked. Typically, a
context menu has context dependent functions to manipulate the selected
object, such as cut, copy and paste. Developers can intercept context menus
before they are displayed to cancel the execution of a context menu, add,
delete, or modify the menu by replacing context menu entries or complete sub
menus. It is possible to provide new customized context menus. 

But i have to show popupmenu in openoffice when user left clicked on tool
bar button. can you please give me an advice how do i implement it.

Thanks & Regards
Ramesh K

ms777 wrote:
> 
> Hi Carsten,
> 
> thanks for the answer. I created an issue:
> http://www.openoffice.org/issues/show_bug.cgi?id=91477
> 
> 
> ms777
> 
> 
> 
> Carsten Driesner wrote:
>> 
>> ms777 wrote:
>>> 
>>> Carsten Driesner wrote:
>>>>
>>>> ... Here you have to create your own popup menu (using
>>>> com.sun.star.awt.PopupMenu) and fill 
>>>> it with your menu items using images and execute it. ...
>>>>
>>>>
>>> 
>>> Carsten,
>>> 
>>> how do you set images using the com.sun.star.awt.PopupMenu service ? It
>>> implements XPopupMenu, which does not expose any setImage function. In
>>> the
>>> OO's UI File/New menu, oo uses the newmenucontroller
>>> (http://framework.openoffice.org/source/browse/framework/framework/source/uielement/newmenucontroller.cxx?rev=1.11.30.1&view=markup),
>>> which internally uses pPopupMenu->SetItemImage( nItemId, aImage ).
>>> SetItemImage, however is not part of XPopup or any other interface
>>> definition ...
>>> 
>>> It seems necessary to program a menucontroller in C and to rebuild OO to
>>> do
>>> use the same approach in order to use SetItemImage in an own
>>> PopupMenuController ... or alternatively program the popup menu window
>>> from
>>> scratch using only the drawing primitives 
>>> 
>> 
>> Hi ms777,
>> 
>> Sorry that I answer so late but I was very busy with OOo final tasks. I 
>> have to admit that you are totally right. That's a missing function in 
>> UNO AWT. Could you or ramesh K write me an issue and I will add this 
>> function to the popup menu object?
>> Ramesh K, although you have to implement your own toolbar controller to 
>> get all the feature you want, you won't be able to add images to your 
>> popup menu. I am not sure if you still want to prepare your work and add 
>> the missing part when the new function is available. Currently you have 
>> to accept that images in your own popup menu are not available for 
>> extensions. Due to a different interface it's possible to add images to 
>> context menus, see "Context menu interceptor". Due to the fact that we 
>> are short before the OOo 3.0 final, please excuse me if I cannot answer 
>> every question in short amount of time.
>> 
>> Regards,
>> Carsten
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/POPUPMENU-tp17917898p18397516.html
Sent from the openoffice - dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to