Print Page | Close Window

SOLVED: Access Context Menu Items attribute

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=11970
Printed Date: 20 June 2025 at 11:54am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SOLVED: Access Context Menu Items attribute
Posted By: WaleedSeada
Subject: SOLVED: Access Context Menu Items attribute
Date Posted: 26 August 2008 at 7:48am
Dear all,
 
I created a number of Context Menus as follows:
CommandBars.ContextMenus.Add(1, "TreeOptions")
CommandBars.ContextMenus.Add(2, "WindowOptions")
 
etc ...
 
I need to access the items properities in those context menu.
(in this case I want to set the enabled properity to false)
 
I try this :
// Loop through the context menus ....
For j = 1 To CommandBars.ContextMenus.Count
 ContextMenuObject = CommandBars.ContextMenus(J)
 ContextMenuObject.Controls(ItemID).Enabled = Status
Next
I got an error message saying invalid arrgument type accessing "Controls", I try to use Item with no avail ...
 
any suggestion ...
Regards


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



Replies:
Posted By: WaleedSeada
Date Posted: 26 August 2008 at 8:05am
Hello all,
 
I found it ....I should find the control by ID first then access it...
 
Best regards
 


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


Posted By: Aaron
Date Posted: 26 August 2008 at 8:17am
Hi,
 
Good for you  Would be nice if you let all members know that your issue is solved. Please look at post: https://forum.codejock.com/forum_posts.asp?TID=11225 - https://forum.codejock.com/forum_posts.asp?TID=11225  
 
Thanks in advance
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: WaleedSeada
Date Posted: 26 August 2008 at 9:23am
Good Point ...


-------------
: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