Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Change coption of a ribbontab
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Change coption of a ribbontab

 Post Reply Post Reply
Author
Message
ruschmeier@truncad.d View Drop Down
Groupie
Groupie


Joined: 12 January 2012
Location: Germany
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote ruschmeier@truncad.d Quote  Post ReplyReply Direct Link To This Post Topic: Change coption of a ribbontab
    Posted: 08 March 2013 at 5:31am
Hi everyone,
 
I must change the caption of a tab on a commandbars-ribbon. But I cannot find a way to do so.
 
I have tried :
 
Form.CommandBars.FindControl(,ID_TAB_RAUM).caption = "Test"
Form.CommandBars.DesignerControls.Find(,ID_TAB_RAUM).caption = "Test"
 
and with both I get an error message:
 
"Objektvariable oder With-Blockvariable nicht gesetzt" (German OS)
"Objectvariable or with-blockvariable not set" (my translation)
 
I hope someone can help me, otherwise all our users have to learn German....
 
Thanks,
Frank
Back to Top
cory View Drop Down
Groupie
Groupie


Joined: 31 August 2004
Location: Italy
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote cory Quote  Post ReplyReply Direct Link To This Post Posted: 22 April 2013 at 7:19am
Hi,

A Try with:

Form.CommandBars.FindControl(,ID_TAB_RAUM, , True).caption = "Test"

you must set the parameter: 'recursive' = true.

By

Cory

Back to Top
ruschmeier@truncad.d View Drop Down
Groupie
Groupie


Joined: 12 January 2012
Location: Germany
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote ruschmeier@truncad.d Quote  Post ReplyReply Direct Link To This Post Posted: 22 April 2013 at 12:26pm
Hi Cory,
 
thanks a lot for the reply. Unfortunately I still get the runtime error 91.
 
But at least someone had an idea. The people from codejock do not seem to be too interested in supporting their customers. That's a real pitty, because the control itself is nice.
 
Or does anyone know a way to get an answer from them?
 
Regards,
Frank
Back to Top
MetallDesign View Drop Down
Groupie
Groupie
Avatar

Joined: 23 September 2008
Location: Switzerland
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote MetallDesign Quote  Post ReplyReply Direct Link To This Post Posted: 06 July 2013 at 3:08pm
hallo frank

habe das gleiche problem. hast du eine lösung gefunden?

gruss ramon
Back to Top
ruschmeier@truncad.d View Drop Down
Groupie
Groupie


Joined: 12 January 2012
Location: Germany
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote ruschmeier@truncad.d Quote  Post ReplyReply Direct Link To This Post Posted: 08 July 2013 at 3:21am
Hallo,
 
nach einigem Trial & error habe ich eine Lösung gefunden.
 
Public Sub SetCaptionTab(CaptionStr As String, ID_TAB As Long, CaptionJN As Integer, ToolTippJN As Integer)
    Dim RibbonBar As RibbonBar
    Dim RibbonTab As RibbonTab
    Set RibbonBar = Korpus.CommandBars.ActiveMenuBar
    Set RibbonTab = RibbonBar.FindTab(ID_TAB)
    If CaptionJN = 1 Then RibbonTab.Caption = CaptionStr
    If ToolTippJN = 1 Then RibbonTab.ToolTip = CaptionStr
End Sub
 
Public Sub SetCaptionGroup(CaptionStr As String, ID_GROUP As Long)
    Dim RibbonBar As RibbonBar
    Dim RibbonGroup As RibbonGroup
    Set RibbonBar = Korpus.CommandBars.ActiveMenuBar
    Set RibbonGroup = RibbonBar.FindGroup(ID_GROUP)
    On Error Resume Next
    RibbonGroup.Caption = CaptionStr
    On Error GoTo 0
End Sub
 
Public Sub SetCaptionControl(CaptionStr As String, ID_CONTROL As Long, CaptionJN As Integer, DescriptionJN As Integer, ToolTippJN As Integer)
    Dim RibbonBar As RibbonBar
    Dim RibbonControl As XtremeCommandBars.CommandBarControl
    Set RibbonBar = Korpus.CommandBars.ActiveMenuBar
    Set RibbonControl = RibbonBar.FindControl(, ID_CONTROL, , 1)
    If CaptionJN = 1 Then RibbonControl.Caption = CaptionStr
    If DescriptionJN = 1 Then RibbonControl.DescriptionText = CaptionStr
    If ToolTippJN = 1 Then RibbonControl.ToolTipText = CaptionStr
End Sub
 
Das funktioniert jetzt ganz gut.
 
Aber schön wäre es gewesen, wenn Codejock wenigstens reagiert hätte...
 
Gruß,
Frank
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.203 seconds.