Hi Ahmed,
I have something in a toolbar that pretty much replicates what you're after.
Here's the basic code. The key element is the style of tbopenbutton3, which
is set to 'dropdownmenu' and then assigned a context menu. Instead of
activating from clicking the button's image, it is activated by selecting
the dropdown arrow and then clicking on the selection.
If you have trouble with the code, let me know; I'll be glad to help.
--------------------------
Dim toolbaricons As ImageList = New ImageList
Dim tbopenbutton As ToolBarButton = New ToolBarButton
Dim tbopenbutton2 As ToolBarButton = New ToolBarButton
tbopenbutton.ImageIndex = 0
tbopenbutton.ToolTipText = "View and print standard reports"
tbopenbutton.Text = "| Standard Reports |"
tbopenbutton2.ImageIndex = 1
tbopenbutton2.ToolTipText = "General Help"
tbopenbutton2.Text = "| IMC System Help |"
ToolBar1.Appearance = ToolBarAppearance.Normal
ToolBar1.Buttons.Add(tbopenbutton)
ToolBar1.Buttons.Add(tbopenbutton2)
ToolBar1.ImageList = toolbaricons
toolbaricons.ImageSize = New System.Drawing.Size(32, 32) ' this could be any
size
toolbaricons.Images.Add(New Icon("f:\imcapps\printer1.ico"))
toolbaricons.Images.Add(New Icon("f:\imcapps\magglass1.ico"))
toolbaricons.Images.Add(New Icon("f:\imcapps\imclogo3.ico"))
Dim tbopenbutton3 As ToolBarButton = New ToolBarButton
tbopenbutton3.ImageIndex = 2
tbopenbutton3.ToolTipText = "Reference Tables"
tbopenbutton3.Text = "| References |"
ToolBar1.Buttons.Add(tbopenbutton3)
tbopenbutton3.Style = ToolBarButtonStyle.DropDownButton
tbopenbutton3.DropDownMenu = ContextMenu1
HTH,
Bernie Yaeger
"Ahmed" <ah*******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hi everyone,
Is there a way to add a toolbarbutton with dropdown menu similar to the
mail button in IE? In another word, when the chevron is part of the
button not beside it.
Thanks
Ahmed