Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Context menu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Context menu

 Post Reply Post Reply
Author
Message
martineu View Drop Down
Newbie
Newbie


Joined: 17 December 2004
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote martineu Quote  Post ReplyReply Direct Link To This Post Topic: Context menu
    Posted: 17 December 2004 at 5:14pm

Just getting started...

Tutorial 1, page 22 reads:  Once the "Context Menu" is complete it must be dragged and dropped back into the collection of controls.

I can't seem to do that.  Dragging and dropping a populated context menu simply results in the loss of the menu and the configuration.

Also, undo/redo don't seem to work.

Thanks,

-Martin

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 17 December 2004 at 8:29pm
You can simply set the popup control that has the context menu items on it to invisible.  Make sure you give the popup an Id.  Then you will be searching in the activemenubar instead of the designercontrols when it comes time to load the context menu.  So it woulb be something like:

Commandbars(1).Find(,ID_OF_CONTEXT_POPUP,,TRUE)
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 17 December 2004 at 8:34pm
One other note.  The tutorial is correct.  Make sure that you first create your own control or type ControlPopup, do not assign it any category.  The drag that control onto the activemenubar.  Now you can add your controls to that popup.  After that, drag the entire popup back into the designer controls list box.   The next time you drag that control onto the activemenubar that should all still be there.
Back to Top
martineu View Drop Down
Newbie
Newbie


Joined: 17 December 2004
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote martineu Quote  Post ReplyReply Direct Link To This Post Posted: 18 December 2004 at 6:45pm

OK, I figured it out. I don't know if this is a bug or a feature (hint: a user manual would be useful)

If you create the context menu and forget to set its type to xtpControlPopup:

click New Control

Enter ID, say "Test1"

Click "OK"

And then, once it is on the form, you realize that you have to change the type...and you change it from with the Properties pane a problem is created.  If you continue to build the context menu and then drag it onto the Controls pane, it is deleted from the form and the menu is lost.  Dragging the "Test1" entry in the Controls pane back into the form results in xtpControlButton with none of the menu entries you added.

That was my problem.  If you change the type on creation all works as advertised.

-Martin

 

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.191 seconds.