![]() |
Ribbnbar selection |
Post Reply ![]() |
Author | |
cmm2006 ![]() Senior Member ![]() Joined: 26 September 2006 Status: Offline Points: 118 |
![]() ![]() ![]() ![]() ![]() Posted: 12 April 2007 at 7:34pm |
hello,
How can I be able to detect wich ribbon tab was selected?
thank you,
![]() |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
In your Execute event add:
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" |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
cmm2006 ![]() Senior Member ![]() Joined: 26 September 2006 Status: Offline Points: 118 |
![]() ![]() ![]() ![]() ![]() |
hello,
I tried your code, but it seems that all the ribbon tabs have the same id "9604", and that is not helping me at all.
so how can I be able to make the difference between the tabs?
thank you,
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
yes, this code help to find event when selected tab was changed. to find selected tab use something like:
if (RibbonBar.Tab(1).Selected) then
or
RibbonBar.SelectedTab
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
cmm2006 ![]() Senior Member ![]() Joined: 26 September 2006 Status: Offline Points: 118 |
![]() ![]() ![]() ![]() ![]() |
Okay,
I used RibbonBar.SelectedTab with the select statment to find out wich tab was selected, but everytime I select tab with the index 1, the application crashed and VB6 is closed. I dont't know if I am doing something wrong or it's something else.
My code:
Dim RibbonBar As RibbonBar
Private Sub CommandBars_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
Select Case Control.Id Case XTPCommandBarsSpecialCommands.XTP_ID_RIBBONCONTROLTAB: Select Case RibbonBar.SelectedTab.Index Case 0 Report1.Visible = False Calendar1.Visible = True Case 1 Calendar1.Visible = True Report1.Visible = False Case 2: MsgBox "Other" End Select Case 1000: End Case 201: Calendar1.ViewType = xtpCalendarWorkWeekView Case 200: Calendar1.ViewType = xtpCalendarDayView Case 202: Calendar1.ViewType = xtpCalendarWeekView Case 203: Calendar1.ViewType = xtpCalendarMonthView End Select End Sub |
|
![]() |
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 |