Adding Window Menu Bar Item programmaticly 
Author Message
 Adding Window Menu Bar Item programmaticly

I want to add an item of a window's menu bar programmaticly. The
supplied example of VW just shows how to do it for a list menu. The
addItem method seem's not to be working for this kind of menu...?
Would it be a good idea to alter the resources protocol and add a
method that manipulated the menu generated from the menu editor
(stored in resources, like "myMenuBar" or whatever...)
Am I on the right track or is there something smarter?
Jens



Wed, 18 Jun 1902 08:00:00 GMT  
 Adding Window Menu Bar Item programmaticly

Jens,

Look at the LensEditor class. This is the AM for the Data Modeler tool.
The window menus on this are built programmatically.

Nick

Quote:

> I want to add an item of a window's menu bar programmaticly.
> Am I on the right track or is there something smarter?
> Jens



Wed, 18 Jun 1902 08:00:00 GMT  
 Adding Window Menu Bar Item programmaticly

Quote:

> I want to add an item of a window's menu bar programmaticly. The
> [...]
> Would it be a good idea to alter the resources protocol and add a
> method that manipulated the menu generated from the menu editor
> (stored in resources, like "myMenuBar" or whatever...)
> Am I on the right track or is there something smarter?

I hold an instance of the menuBar in an instance variable of the
application model (actually it's a ValueHolde). This is set when
starting up the application (postOpenWith:) to the value supplied with
the menu resource. During runtime you can then alter this menu bar as
you like. There might be a better way to do it, that's just what I
figured out to work for me.

        Stefan

--

| Otto-von-Guericke-Universitaet Magdeburg       TEL:  +49 391 67 128 61 |
| FIN, ISG, Uniplatz 2,  D-39106 Magdeburg       FAX:  +49 391 67 111 64 |
 ------------[ http://isgwww.cs.Uni-Magdeburg.DE/~stefans/ ]-------------



Wed, 18 Jun 1902 08:00:00 GMT  
 Adding Window Menu Bar Item programmaticly
I want to add an item of a window's menu bar programmaticly. The
supplied example of VW just shows how to do it for a list menu. The
addItem method seem's not to be working for this kind of menu...?
Would it be a good idea to alter the resources protocol and add a
method that manipulated the menu generated from the menu editor
(stored in resources, like "myMenuBar" or whatever...)
Am I on the right track or is there something smarter?
Jens


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Add menu items to File menu

2. only add a scroll bar when the window is minimized and scroll bar is needed

3. Unicode support inconsistency between menu titles and menu items on Windows

4. bug in 8.2/windows menu item delete in middle of menu

5. erasing the cascaded menu bar items???

6. Adding Items to C4 IDE Menu

7. Adding an item to the popup menu

8. Adding items to a menu with CW 2.003

9. Dynamic add menu items

10. VO - want to add a new option under a menu item

11. Adding an item to desktop menu with REXX

12. Add menu items

 

 
Powered by phpBB® Forum Software