Print Page | Close Window

SOLVED: Hhierarchical Context Menu, How to ??

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=12008
Printed Date: 07 October 2024 at 2:22pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SOLVED: Hhierarchical Context Menu, How to ??
Posted By: WaleedSeada
Subject: SOLVED: Hhierarchical Context Menu, How to ??
Date Posted: 28 August 2008 at 8:56am
Dear All,
 
I try to create a hierarchical context menu, with no luck, I defien one itme as popup and try to add to it's control items, but it always goes to the main context menu...
 
Is there any way to achieve that ..
 
Best regards,
 


-------------
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada



Replies:
Posted By: Oleg
Date Posted: 28 August 2008 at 1:28pm
Hi,
 
try
 
Control.CommandBar.Controls.Add


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: WaleedSeada
Date Posted: 31 August 2008 at 2:57am
Hello Oleg,
 
I am afraid this is not possible, I took one of the examples SDISample, there is a script to create context menu, I try to add your line, but the intelisence didn't regonize ..
 
Take a look:
    Dim ContextBar As CommandBar
    Set ContextBar = CommandBars.ContextMenus.Add(400, "Context Menu")
    With ContextBar.Controls
        .Add xtpControlButton, ID_FILE_NEW, "&New"
        .Add xtpControlButton, ID_FILE_OPEN, "&Open"
        .Add xtpControlButton, ID_FILE_SAVE, "&Save"
       
        Set Control = .Add(xtpControlButton, ID_FILE_PRINT, "&Print")
        Control.BeginGroup = True
       
        Set Control = .Add(xtpControlButton, ID_EDIT_CUT, "Cu&t")
        Control.BeginGroup = True
        Control.Controls.Add xtpControlButton, 1212, "Hello"
       
        .Add xtpControlButton, ID_EDIT_COPY, "&Copy"
        .Add xtpControlButton, ID_EDIT_PASTE, "&Paste"
    End With
Logical should work ...
 
Can you provide a script to loop through all the active menu items if possible, this would be of great help to me ...
 
Best regards


-------------
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada


Posted By: WaleedSeada
Date Posted: 04 September 2008 at 2:07am
Hi All,
 
CommandBar     Imenu
Imenu = CommandBars.ContextMenus(2).Controls.Find(0, 240)
 
Imenu.CommandBar.Controls.Add( .....
 
Thanks and best regards
 


-------------
:Powerbuilder 10.5
:Codejock suite 11.2.2
=========================
Waleed Seada



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