make toolbar button flat

auxcom
04-01-2004, 01:37 AM
Good day,

How to make the toolbar button flat? What property to set? And lastly, I like retrieving an item using its key, I notice that the key property in a collections is gone in vb.net.

In vb6,
toolbar.Buttons("keyname").Text

In .net, how to do this?

AtmaWeapon
04-01-2004, 06:28 AM
To make toolbar buttons flat, set the Toolbar's Appearance property to flat.

I'm not sure about using a key for the buttons, try setting the Name property of the toolbar button and using that as an index. I don't see an Item property for the toolbar so that may not work.

Doubleface
06-10-2004, 07:46 AM
To retrieve the index of the button you have clicked you need to use the select case:

Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
Select Case ToolBar1.Buttons.IndexOf(e.Button)
Case 0
toolbarbutton1.enabled = True
Case 5
End
End Select
End Sub

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum