Print Page | Close Window

Tab Toolbar Click 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=6683
Printed Date: 18 June 2025 at 11:11pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tab Toolbar Click Event
Posted By: Rod001
Subject: Tab Toolbar Click Event
Date Posted: 20 March 2007 at 12:35pm
Hello. I am using CommandBars Contol (10.4.2) with the following code to create a tab that will execute an event to show different calendar views. I am not sure if this is correct or even possible. Please any help would be appreciated.
 
Thank you. 

 
Private Sub CreateToolBar()
    Dim Control As CommandBarControl
   
    'Removes the menu bar and all toolbars
    CommandBars.DeleteAll
    'Re-Add the Menu Bar
'    CommandBars.AddMenuBar "Menu"
 '   commandbars.
    'Add a Tabbed ToolBar
    Set TabToolBar = CommandBars.AddTabToolBar("Standard Tabbed Toolbar")  '("Standard", xtpBarTop)
   
    Dim toolbarTab As TabControlItem
       
    '************************************
    'Add Categories to the Tabbed ToolBar
    '************************************
   
    'Add the "Standard" Category
    Set toolbarTab = TabToolBar.InsertCategory(ID_TAB_DAY, "Day")
    toolbarTab.Image = ID_DAY_ICON
   
    'Add the "Advanced" Category
    Set toolbarTab = TabToolBar.InsertCategory(ID_TAB_WORKWEEK, "WorkWeek")
    toolbarTab.Image = ID_WORKWEEK_ICON
   
    'Add the "Other" Category
    Set toolbarTab = TabToolBar.InsertCategory(ID_TAB_WEEK, "Week")
    toolbarTab.Image = ID_WEEK_ICON
   
    'Add the "User Tools" Category
    Set toolbarTab = TabToolBar.InsertCategory(ID_TAB_MONTH, "Month")
    toolbarTab.Image = ID_MONTH_ICON
   
    'setup tabs parameters
    TabToolBar.MinimumWidth = 400
    TabToolBar.TabPaintManager.BoldSelected = True
    TabToolBar.ShowExpandButton = False
    TabToolBar.ShowGripper = False
    TabToolBar.TabPaintManager.Appearance = xtpTabAppearanceVisualStudio2005
    TabToolBar.ContextMenuPresent = False
    TabToolBar.AllowReorder = False
    TabToolBar.EnableDocking xtpFlagAlignLeft

 '   TabToolBar.Customizable = False
   
    TabToolBar.UpdateTabs
   
    ' ADD icons to tab
     CommandBars.Icons = ImageManager.Icons

End Sub




Replies:
Posted By: moe188
Date Posted: 20 March 2007 at 4:24pm
Hi,
Why don't you use the commandbar to creat toolbar with 4 buttons (Day view, Work Week, Week, Month), then add calendar control to your form, and everytime you click a button in your toolbar, the view of the calendar control will change.
 


Posted By: Rod001
Date Posted: 21 March 2007 at 8:16pm
Hi moe, 
 
Thanks for the response.
Per your suggestion I used the commandbar and it worked out great.

Thanks again for the help. 
 


Posted By: moe188
Date Posted: 22 March 2007 at 9:05am

Hi Rod,

it works fine for me, you can check the attached file, and let me know if that what you are trying to do.

https://forum.codejock.com/uploads/20070322_095330_Calendar.zip - uploads/20070322_095330_Calendar.zip


Posted By: Rod001
Date Posted: 22 March 2007 at 11:40am
Moe,
 
Thanks for the example, it confirmed that I was started in the right direction.
 



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