Print Page | Close Window

edit commandbar item

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


Topic: edit commandbar item
Posted By: mozaheb
Subject: edit commandbar item
Date Posted: 09 August 2008 at 2:55am
hi.
how edit the commandbar`s Item?
i have menubar with commandbar component. now i need to edit this menu item.
examole:
first:  i have:                        file>new>new project
second : i need edit to :      file> new>new form

please answer to my question.
thanks 



Replies:
Posted By: jpbro
Date Posted: 09 August 2008 at 11:20am
If you are using Actions, you can change all instances of the caption as follows:


      Me.CommandBars1.Actions(ID_NUMBER).Caption = "New Form"


Where ID_NUMBER is the ID of the command bar item.

If you aren't using actions, you can use FindControl (works best when there is only one item with the ID you are looking for:


      Me.CommandBars1.FindControl(, ID_NUMBER, , True).Caption = "New Form"


Alternately, when adding your control you can assign it to a module level variable (e.g. Set mobjNew = Me.CommandBars1.Add("Standard", xtpBarTop).Controls.Add(xtpControlLabel ID_NUMBER, "") ) and then change the caption of that variable (e.g. mobjNew.Caption = "New Form")




-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: mozaheb
Date Posted: 10 August 2008 at 1:09am
thank you  member_profile.asp?PF=2676&FID=116 - jpbro .





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