Print Page | Close Window

Context menu

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=1553
Printed Date: 29 September 2024 at 6:16pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Context menu
Posted By: martineu
Subject: Context menu
Date 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




Replies:
Posted By: SuperMario
Date 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)


Posted By: SuperMario
Date 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.


Posted By: martineu
Date 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

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net