Community
Showing results for 
Search instead for 
Do you mean 
Reply

Menu separators

Copper Contributor
Posts: 119
Country: USA

Menu separators

by russell.jones on 12-21-2007 10:35 AM

I'm sure i'm missing something really trivial but I don't seem to be able to add a separator bar to a menu in ACT!.  Is there an example of doing this anywhere or can someone give me a code snippet?

 Regards,

 Russell
 

Copper Contributor
Posts: 119
Country: USA

Re: Menu separators

by russell.jones on 01-28-2008 10:31 AM

Just a quick bump.

Has anyone used menu separators in ACT! when adding custom menus?

I've tried looking at the pre-existing menus in ACT! but I can't see any menu items relating to the separators.  I've tried naming things "-" as with winforms but that doesn't seem to work either.

 

If anyone has any ideas on how to get these to work I'd love to hear from you.

 Thanks


Russell

Tuned Listener
Posts: 11
Country: Switzerland

Re: Menu separators

[ Edited ]
Hi Russell

If you create a new button use the overload which accepts a parameter for adding a separator.

Public Sub New( _
ByVal text As String, _
ByVal tooltip As String, _
ByVal handler As System.EventHandler, _
ByVal cmd As String, _
ByVal lrgImage As System.Drawing.Image, _
ByVal smImage As System.Drawing.Image, _
ByVal displayStyle As Act.UI.Core.CommandBarControl.ItemDisplayStyle, _

ByVal hasSeparator As Boolean,

ByVal strCategory As String)

'Member of: Act.UI.Core.CommandBarButton

Reto

Message Edited by rscherrer on 01-29-2008 11:06 AM
Reto Scherrer
Ambit AG
Switzerland
Copper Contributor
Posts: 97
Country: USA

Re: Menu separators

Or if you've already constructed it, you can set a property...
                    Act.UI.Core.CommandBarButton nMenuItem = myExistingMenuItem;
                    nMenuItem.HasSeparator = true;
 
Also look at:
                    ActApp.Explorer.CreateMenuItem(...);
                    ActApp.Explorer.CreateMenuItemUnderAnotherMenuItem(...);
                    ActApp.Explorer.CreateMenuItemUnderAnotherMenuItemWith2Separators(...);
                    ActApp.Explorer.CreateMenuItemWith2Separators(...);
 
jason
 
Jason Sellers
ACT! Engineer 2000-2007
Tuned Listener
Posts: 23
Country: UK

Re: Menu separators

Thanks guys, I've used both of those methods and they work perfectly, can't believe I didn't see those constructors / properties. Russell
Tuned Listener
Posts: 11
Country: India

custom field in the Menu

Hi All,

I need custom field to show in the Look up Menu. I have put it on the toolbar, but I wants the field to show on the Menu.
How do I achieve this?
 
If you have any idea pls share with me.

Thanks!
Skumar
Nickel Super Contributor
Posts: 441
Country: UK

Re: custom field in the Menu

Add a menu item to this urn act-ui://com.act/application/menu/lookup eg.
 

AddMenuItem("act-ui://com.act/application/menu/lookup/CustomField1", "Lookup Custom Field 1...", New Act.UI.CommandHandler(AddressOf LookupCustomField)

If you need an example for adding a menu item in general have a look at the act sdk examples.  There should be one called vb_app_simple01 or something similar which contains an example for adding to a menu and contains the rest of the methods for the above.

HTH

Tom

Tuned Listener
Posts: 11
Country: India

Re: custom field in the Menu

Hi Tom,
 
Let me check, Thanks alot !!
 
Reg,
 
Skumar