Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Tab Toolbar Click Event
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Tab Toolbar Click Event

 Post Reply Post Reply
Author
Message
Rod001 View Drop Down
Newbie
Newbie


Joined: 29 September 2006
Location: United States
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rod001 Quote  Post ReplyReply Direct Link To This Post Topic: Tab Toolbar Click Event
    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

Back to Top
moe188 View Drop Down
Senior Member
Senior Member


Joined: 27 March 2006
Status: Offline
Points: 220
Post Options Post Options   Thanks (0) Thanks(0)   Quote moe188 Quote  Post ReplyReply Direct Link To This Post 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.
 
Back to Top
Rod001 View Drop Down
Newbie
Newbie


Joined: 29 September 2006
Location: United States
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rod001 Quote  Post ReplyReply Direct Link To This Post 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. 
 
Back to Top
moe188 View Drop Down
Senior Member
Senior Member


Joined: 27 March 2006
Status: Offline
Points: 220
Post Options Post Options   Thanks (0) Thanks(0)   Quote moe188 Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Rod001 View Drop Down
Newbie
Newbie


Joined: 29 September 2006
Location: United States
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rod001 Quote  Post ReplyReply Direct Link To This Post Posted: 22 March 2007 at 11:40am
Moe,
 
Thanks for the example, it confirmed that I was started in the right direction.
 
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.063 seconds.