Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - [Solved] How to get the tab from the control
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[Solved] How to get the tab from the control

 Post Reply Post Reply
Author
Message
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post Topic: [Solved] How to get the tab from the control
    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)

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: 11 July 2011 at 6:30am
Hi,

its Control.RibbonGroup.Groups.RibbonTab
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post 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)

Back to Top
dpenaloza View Drop Down
Newbie
Newbie
Avatar

Joined: 08 September 2010
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpenaloza Quote  Post ReplyReply Direct Link To This Post 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..

 
 
Back to Top
dpenaloza View Drop Down
Newbie
Newbie
Avatar

Joined: 08 September 2010
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpenaloza Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2011 at 10:42am
how can i detect when the user change or click on any tabs  
Back to Top
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post 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)

Back to Top
levent View Drop Down
Newbie
Newbie


Joined: 31 March 2011
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote levent Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
dpenaloza View Drop Down
Newbie
Newbie
Avatar

Joined: 08 September 2010
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpenaloza Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
levent View Drop Down
Newbie
Newbie


Joined: 31 March 2011
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote levent Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2011 at 3:46pm
Thanks dpenaloza;

It's solve my problem

Best regards
Back to Top
levent View Drop Down
Newbie
Newbie


Joined: 31 March 2011
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote levent Quote  Post ReplyReply Direct Link To This Post 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
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.156 seconds.