Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - SOLVED. looping through commandbar actions
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED. looping through commandbar actions

 Post Reply Post Reply
Author
Message
marcel View Drop Down
Newbie
Newbie
Avatar

Joined: 13 December 2006
Location: Netherlands
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote marcel Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED. looping through commandbar actions
    Posted: 16 August 2008 at 4:40am
Hi all,
 
I have commandbars with ActionsEnabled true. For a translation tool I want to loop through all actions and translate the Caption ad Tooltips.
 
The translation tool doesn't know anything of the indexes of the action items.
 
How can I loop through all actions?
 
Something like this?
 
For i = 1 to CommandBars:Actions:Count Do:
   CommandBars:Actions:Item(i).Caption = "New TranslatedValue";
End;
 
But that don't seems to work. How can I access all actioncontrols without knowing their index values?
 
Thanks for help!
 
Greetz,
Marcel
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 2:16am
Hi,
 
For VB6 it looks like
    Dim a As CommandBarAction
    For Each a In CommandBars.Actions
        Debug.Print a.Caption
    Next
   
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2008 at 10:06am
Originally posted by marcel marcel wrote:

Hi all,
 
[...]
 
Something like this?
 
For i = 1 to CommandBars:Actions:Count Do:
   CommandBars:Actions:Item(i).Caption = "New TranslatedValue";
End;
 
Greetz,
Marcel
 
Hi,
 
Try this:
 
For i = 1 to CommandBars:Actions:Count Do:
   CommandBars:Actions:Action(i).Caption = "New TranslatedValue";
End;
 
 
I don't know what language you use, so I suggest you look at post: https://forum.codejock.com/forum_posts.asp?TID=11225 first and if your issue is solved change your topic description into SOLVED: <your topic description>
 
 
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....
Back to Top
marcel View Drop Down
Newbie
Newbie
Avatar

Joined: 13 December 2006
Location: Netherlands
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote marcel Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2008 at 4:46pm
Solved!
 
I can retrieve all commandbar controls by:
CommandBars:Item(i):Controls:Item(i2):Caption
 
i = number of the commandbar
i2 = number of the control in the Controls collection of the commandbar
 
That's enough for the translation tool although their are duplicated values of controls both on the menu and any commandbar.
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.219 seconds.