ShortCut Bar with Panes |
Post Reply |
Author | |
bjoeylouie
Newbie Joined: 01 April 2004 Status: Offline Points: 5 |
Post Options
Thanks(0)
Posted: 05 April 2004 at 10:24pm |
I have 2 short cut bars on a form named wndLeftShortCutBar and wndMainShortCutBar. There are several Panes
in the wndLeftShortCutBar as follows: Sub CreateShortcutBar() . . . Set ItemMail = wndLeftShortCutBar.AddItem(1, "Mail", frmPaneMail.hWnd) Set Item = wndLeftShortCutBar.AddItem(2, "Calendar", frmPaneCalendar.hWnd) Set Item = wndLeftShortCutBar.AddItem(3, "Tasks", frmPaneTasks.hWnd) . . . frmPaneTasks has several buttons which when clicked will display in wndMainBar. My question: How do I display different forms in the wndMainBar by clicking on a button in wndLeftBar pane? I tried the following with no luck. Private Sub btnTasks_Click() Dim ItemTasks As IShortcutBarItem Load frmTasks Set ItemTasks = wndMainBar.AddItem(9, "Tasks", frmTasks.hWnd) End Sub Wonder if you could help me with this? bJoeyLouie |
|
robs
Groupie Joined: 09 November 2003 Status: Offline Points: 84 |
Post Options
Thanks(0)
|
bjoeylouie, Is it breaking on Set ItemTaks = wndMainBar.AddItem(9, "Tasks", frmTasks.hWnd) ? Object Required? If so, try this, of not sorry I couldn't help... Try adding this to a standard module: Public mainBar As XtremeSuiteControls.ShortcutBar Add this to the main form with the shortcutbar: set mainBar = wndMainBar Then in btnTasks_clic(): load frmTasks mainBar.AddItem 9,"Tasks",frmTasks.hWnd
|
|
bjoeylouie
Newbie Joined: 01 April 2004 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
thanks, I'm now getting this error message
"Expected procedure or variable, not module |
|
robs
Groupie Joined: 09 November 2003 Status: Offline Points: 84 |
Post Options
Thanks(0)
|
In the main form with the shortcutbar: set mainBar = wndMainShortCutBar instead of set mainBar = wndMainBar Does this help? If not, what is that error number? Thanks
|
|
bjoeylouie
Newbie Joined: 01 April 2004 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Still not working, same error message - no error number is provided. To review what I did: In the Main Form with the shortcut bar add: Set MainBar = wndMainShortcutBar Add a Module named MainBar.bas with this code: Public MainBar As XtremeSuiteControls.ShortcutBar Here is the button click event: Private Sub btnTasks_Click() |
|
robs
Groupie Joined: 09 November 2003 Status: Offline Points: 84 |
Post Options
Thanks(0)
|
Should be: Private Sub btnTasks_Click() Sorry if this doesn't work. I was able to get this to work in the ShortcutBar sample by: 1. Adding a button to frmPaneCalendar (this has the btnTasks_click() event) 2. Adding the standard module with the public variable. 3. Setting the public variable in the form_load of frmMain.
|
|
bjoeylouie
Newbie Joined: 01 April 2004 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
If you have a minute, could you post your code for items 1, 2 and 3 above? I'd like to duplicate your sample... this will help me find my error. Thanks |
|
robs
Groupie Joined: 09 November 2003 Status: Offline Points: 84 |
Post Options
Thanks(0)
|
Sorry for the delay. Using ShortcutBar Codejock sample, add a form called frmTasks 1. Add the button to frmPaneCalendar named btnTasks Code: Private Sub btnTasks_Click() 2. Add a standard module with a public variable Code: Public MainBar As XtremeSuiteControls.ShortcutBar 3. Set the public variable in the form_load of frmMain Code: Set MainBar = wndShortcutBar
This works for me. It adds a new item to the collection and when clicked, shows frmTasks. Good luck!
|
|
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 |