I am trying to add a tool bar to a window.
I drag it from the library to the window, but nothing happens.
?
Brian - Click on Insert > Toolbar from the top menu bar. You can then drag it from the left hand-side navigator area, to your window.
It will then appear near the bottom of your screen.
You can then right click on the toolbar in the left-hand navigator area, in order to insert event handler code.
Hope that helped
Helps!
But if it doesn’t work from the library, then why is it there?
No idea - it had me fooled for a while
There may be a feedback report for it - if not, you could create one.
Glad I was able to help you.
Please feel free to ask if you need anymore help - I wail always try to help (if I can!)
uhhh… well Now how do I add buttons to the tool bar.
Man this changed.
I go away for a few months and I can’t add a tool bar.
So you can drag it to the Navigator, as an alternative to using the menus. Similar to ContainerControl. You can’t add one directly to a window, you must create a subclass first.
Brian - here is some example code for a button - it needs to be put in the Toolbar > Open event handler:
[code]// INSTANTIATE BUTTON
CreateButton = New ToolButton
// CAPTION (BELOW THE ICON)
CreateButton.Caption=“CREATE”
// NAME OF THE BUTTON
CreateButton.Name=“Create”
// IMAGE WHICH NEEDS TO BE ADDED TO THE PROJECT
CreateButton.icon=CreateButtonImage
// DEFINE BUTTON TYPE
CreateButton.Style=ToolButton.ToolStylePushButton
// ADD BUTTON TO THE TOOLBAR
Me.Append FlexibleSpacerButton[/code]
So the editor for adding buttons in the IDE is gone?
Brian - you will also need to create a property of the window called CreateButton with the type of ToolButton.
Select the toolbar class in the left pane (not the instance on the window). You will be in the editor.
Then press the + icon.
'cause otherwise I’m staring at a blank screen.
Brian,
Pressing the plus icon will allow you to include an event handler - yes.
I then put this code in the Toolbar > Action event handler:
[code] Select Case Item.Name
Case “Create”
NewSnippetWindow.Show
End Select[/code]
[quote=99553:@Brian O’Brien]Then press the + icon.
'cause otherwise I’m staring at a blank screen.[/quote]
That’s right. It is the editor…
For toolbar menus you need to add them in the Open Event too:
[code] Dim markMenu As New WebMenuItem
markMenu.Append(New WebMenuItem(“Export to XML/XLS”))
markMenu.Append(New WebMenuItem(“Export to CSV”))
markMenu.Append(New WebMenuItem(“Export to Tab-Delimited”))
markMenu.Append(New WebMenuItem(“Export to PDF”))
WebToolbarMenu(me.ItemWithName(“ExportListMenu”)).menu = markMenu[/code]