Print Page | Close Window

[Solved] How to get the tab from the control

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=18643
Printed Date: 05 October 2024 at 10:47pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [Solved] How to get the tab from the control
Posted By: Albert1
Subject: [Solved] How to get the tab from the control
Date Posted: 11 July 2011 at 6:15am
Hello,
anyone knows how to get (in a ribbonbar) the tab that contains a control?
Is there a better way than a loop over the tabs/controls (if I am able to find a relationship between tab and controls...)
Thank you


-------------
Product: Xtreme SuitePro (ActiveX) version 13.4.1 / 16.3.0

Platform: Windows Vista (32bit) - SP 2

Language: Visual Basic 6.0 (SP6)




Replies:
Posted By: Oleg
Date Posted: 11 July 2011 at 6:30am
Hi,

its Control.RibbonGroup.Groups.RibbonTab


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Albert1
Date Posted: 11 July 2011 at 6:39am
What to say???
I have spent some hours of time but I havent noticed "Group: Collection of RibbonGroup objects that have been added to the RibbonTab".
Again, thanks a lot!


-------------
Product: Xtreme SuitePro (ActiveX) version 13.4.1 / 16.3.0

Platform: Windows Vista (32bit) - SP 2

Language: Visual Basic 6.0 (SP6)



Posted By: dpenaloza
Date Posted: 26 August 2011 at 10:40am

hi to all, can you help with this i need to detect when the user click on any tabs how can i detect when change it..

 
 


Posted By: dpenaloza
Date Posted: 26 August 2011 at 10:42am
how can i detect when the user change or click on any tabs  


Posted By: Albert1
Date Posted: 26 August 2011 at 5:31pm
Take a look @ RibbonMdiSample. There is the following code you need:
 
 

Private Sub CommandBars_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
    On Error Resume Next
   
    Select Case Control.Id
        Case XTPCommandBarsSpecialCommands.XTP_ID_RIBBONCONTROLTAB:
            Debug.Print "Selected Tab is Changed"
...       


-------------
Product: Xtreme SuitePro (ActiveX) version 13.4.1 / 16.3.0

Platform: Windows Vista (32bit) - SP 2

Language: Visual Basic 6.0 (SP6)



Posted By: levent
Date Posted: 29 August 2011 at 11:30am
Hello Albert;

I asked this question before in this forum
 too such as dpenaloza  but nobody answered.

Yes I know this code but we can't understand which tab was pressed from this code.

Best regards


Posted By: dpenaloza
Date Posted: 01 September 2011 at 3:01pm
may be this code help you
 
 
Private Sub CommandBars_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
  Select Case Control.Id
      Case 9604:
          Set theribon = CommandBars.ActiveMenuBar
          v_ribbon = theribon.SelectedTab.Caption
          Select Case UCase(v_ribbon)
            Case "DEPARTMENT":
                       'SENTENCES
 
            Case "AREA":
                       'SENTENCES
         END SELECT
   END SELECT
END SUB


Posted By: levent
Date Posted: 13 September 2011 at 3:46pm
Thanks dpenaloza;

It's solve my problem

Best regards


Posted By: levent
Date Posted: 14 September 2011 at 4:16am
Dear Dpenaloza;

Did you get following error after using code above

run -time error '-2147417848 (80010108)':
Method 'InsertTab' of object 'IRibbonBar' failed

Best regards



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