[api-dev] Re: Adding Items to a Sub-Menu

2011-06-16 Thread Hal Vaughan
I kind of had to drop the idea of displaying the note titles in the menu for a 
number of reasons.

Thanks, anyway!



Hal

On Jun 15, 2011, at 2:10 PM, Oliver Brinzing wrote:

> Hi Hal,
> 
>> From what I remember, to add things to a sub menu, I have to do that by 
>> hand.  
>> Am I wrong?  Is there a way, using OO Basic to add items to a sub menu?
> 
> i just found an example:
> 
> Programmatically adding to existing Menus
> http://www.oooforum.org/forum/viewtopic.phtml?p=102127
> 
> to make it run i had to change the "sMyCommand"
> 
>> The hard part is I only want those sub-menu items available when that 
>> document window is selected.
> 
> mh, don't know, the example will add an entry to all spreadsheets ...
> 
> 
> Regards
> 
> Oliver
> -- 
> 
> GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45
> 

-- 
-
To unsubscribe send email to dev-unsubscr...@api.openoffice.org
For additional commands send email to sy...@api.openoffice.org
with Subject: help


[api-dev] Re: Adding Items to a Sub-Menu

2011-06-16 Thread Fernand Vanrie

Ariel,

The stuff you did with a dialog's  an menu's inside, could be a 
alternative in basic ?


the examples made by Ariel  i found here 




Hope it helps

Fernand


Hello Hal,

On Wednesday 15 June 2011, 02:05, Hal Vaughan wrote:

I haven't been using the API for a while and I'm working on a macros in OO
Basic.

 From what I remember, to add things to a sub menu, I have to do that by
hand.  Am I wrong?  Is there a way, using OO Basic to add items to a sub
menu?

I'm creating a sticky-note program that will let me make notes that are
attached to a document.  They're stored in the document text fields.  I'd
like to be able to, when a note is created, add a menu item with the note
title to a sub-menu I'm creating.  Also, of course, if the note is
deleted, I'd like to remove that item from the menu.  The hard part is I
only want those sub-menu items available when that document window is
selected.

Is that do-able without going through a nightmare?

you need to develop a UNO component implementing a PopupMenuController,
impossible in OOo Basic, you must code in Java, C++ or Python.


Regards


--
-
To unsubscribe send email to dev-unsubscr...@api.openoffice.org
For additional commands send email to sy...@api.openoffice.org
with Subject: help


[api-dev] Re: Adding Items to a Sub-Menu

2011-06-15 Thread Ariel Constenla-Haile
Hello Hal,

On Wednesday 15 June 2011, 02:05, Hal Vaughan wrote:
> I haven't been using the API for a while and I'm working on a macros in OO
> Basic.
> 
> From what I remember, to add things to a sub menu, I have to do that by
> hand.  Am I wrong?  Is there a way, using OO Basic to add items to a sub
> menu?
> 
> I'm creating a sticky-note program that will let me make notes that are
> attached to a document.  They're stored in the document text fields.  I'd
> like to be able to, when a note is created, add a menu item with the note
> title to a sub-menu I'm creating.  Also, of course, if the note is
> deleted, I'd like to remove that item from the menu.  The hard part is I
> only want those sub-menu items available when that document window is
> selected.
> 
> Is that do-able without going through a nightmare?

you need to develop a UNO component implementing a PopupMenuController, 
impossible in OOo Basic, you must code in Java, C++ or Python.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina


signature.asc
Description: This is a digitally signed message part.


[api-dev] Re: Adding Items to a Sub-Menu

2011-06-15 Thread Oliver Brinzing
Hi Hal,

>From what I remember, to add things to a sub menu, I have to do that by hand.  
> Am I wrong?  Is there a way, using OO Basic to add items to a sub menu?

i just found an example:

Programmatically adding to existing Menus
http://www.oooforum.org/forum/viewtopic.phtml?p=102127

to make it run i had to change the "sMyCommand"

> The hard part is I only want those sub-menu items available when that 
> document window is selected.

mh, don't know, the example will add an entry to all spreadsheets ...


Regards

Oliver
-- 

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45



signature.asc
Description: OpenPGP digital signature