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

edit commandbar item

 Post Reply Post Reply
Author
Message
mozaheb View Drop Down
Senior Member
Senior Member


Joined: 03 April 2008
Status: Offline
Points: 104
Post Options Post Options   Thanks (0) Thanks(0)   Quote mozaheb Quote  Post ReplyReply Direct Link To This Post Topic: edit commandbar item
    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 
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
mozaheb View Drop Down
Senior Member
Senior Member


Joined: 03 April 2008
Status: Offline
Points: 104
Post Options Post Options   Thanks (0) Thanks(0)   Quote mozaheb Quote  Post ReplyReply Direct Link To This Post Posted: 10 August 2008 at 1:09am
thank you  jpbro.


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.250 seconds.