Print Page | Close Window

Change coption of a ribbontab

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=20878
Printed Date: 28 November 2024 at 8:31pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Change coption of a ribbontab
Posted By: ruschmeier@truncad.d
Subject: Change coption of a ribbontab
Date 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



Replies:
Posted By: cory
Date 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



Posted By: ruschmeier@truncad.d
Date 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


Posted By: MetallDesign
Date Posted: 06 July 2013 at 3:08pm
hallo frank

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

gruss ramon


Posted By: ruschmeier@truncad.d
Date 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



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