![]() |
SOLVED. looping through commandbar actions |
Post Reply ![]() |
Author | |
marcel ![]() Newbie ![]() ![]() Joined: 13 December 2006 Location: Netherlands Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
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.... |
|
![]() |
|
marcel ![]() Newbie ![]() ![]() Joined: 13 December 2006 Location: Netherlands Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |