Print Page | Close Window

TabToolBar Execute Event

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=10569
Printed Date: 16 June 2025 at 3:38pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: TabToolBar Execute Event
Posted By: McKloony
Subject: TabToolBar Execute Event
Date Posted: 09 May 2008 at 3:36am
How can I find out witch Control.id a TabControlItem sends, if a user clicks on it? A RibbonBar has the XTP_ID_RIBBONCONTROLTAB flag.

-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6



Replies:
Posted By: Oleg
Date Posted: 09 May 2008 at 4:47am
Hi,
TabToolBar has own SelectedChanged event.


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


Posted By: McKloony
Date Posted: 09 May 2008 at 5:06am
Thank you, in the onlinehelp I can read this, but in my VB6 enviroment there is no such event? Only the Execute event is shown.

-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6


Posted By: McKloony
Date Posted: 09 May 2008 at 7:30am
I set Private WithEvents TbBar As XtremeCommandBars.TabToolBar and have the event now. Bit waht ist the next step?


-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6


Posted By: Aaron
Date Posted: 09 May 2008 at 8:20am
Hi,
 
Depends of what you want. You want the ID of the selected item or Tab?
 
I guess (I never used this before)
 
The tab has no ID and the selected items will fire Execute event of commandbars, just the same as a menu item or toolbar item


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: McKloony
Date Posted: 09 May 2008 at 8:43am

I would be glad, if the TabedCommandBar would fire a execute event. But you see, tah oleg wrotes that there is an separate event. This ist ok, but I'm m not able to find out how to use it?



-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6


Posted By: Aaron
Date Posted: 09 May 2008 at 9:04am
Hi,
 
The tab has no ID and the selected items will fire Execute event of commandbars, just the same as a menu item or toolbar item
 
Private Sub CommandBars_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
 
    Select case Control.ID
        Case ID_whatever
            ...........
  
End Sub
 
The tabtoolbar has only 2 events:
 
Private Sub TbBar_BeforeItemClick(ByVal Item As XtremeCommandBars.ITabControlItem, Cancel As Variant)
End Sub
Private Sub TbBar_SelectedChanged(ByVal Item As XtremeCommandBars.ITabControlItem)
End Sub
and Oleg ment the last one.


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: McKloony
Date Posted: 09 May 2008 at 9:44am
https://forum.codejock.com/uploads/20080509_094232_CodeJock.zip - uploads/20080509_094232_CodeJock.zip
 
Ok I upload a VB6 sample. In the Execute Event i postet da MsgBox command. If you click onto a Tab, the is no execute event!
 
The is also no SelectedChanged event, whre i place any code :-/


-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6


Posted By: Aaron
Date Posted: 09 May 2008 at 1:52pm
Hi,
 
Replace:
 
Private tbBar As XtremeCommandBars.TabToolBar
 
with

Private WithEvents tbBar As XtremeCommandBars.TabToolBar
 
Now you have the SelectionChanged and BeforeItemClick event
 
 
If you click on a TAB the tbBar_SelectedChanged event will fire.
 
If you click on a toolbar item the comBar01_Execute event will fire
 

 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



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