[2005] Toolbar - Hiding Buttons
Hello,
I wonder if anyone can help me please ?
I have a toolbar on my application that has a series of buttons on, each calling different forms.
What I'd like to do is hide one or two of the buttons depending on the users access level, so for example if they were an access level 3, they would see the buttons, but anything less, then they wouldn't.
Can this be done ?
Re: [2005] Toolbar - Hiding Buttons
Not sure if you can hide it but you can set the Enabled Property.
Quote:
When the Enabled property is set to false, the toolbar button cannot be clicked, and the button's appearance changes. The Image and Text assigned to the button appear grayed out. If the image or text has multiple colors, they display in a monochromatic gray.
Re: [2005] Toolbar - Hiding Buttons
Just set the visible property of the toolbar button to false...
vb Code:
ToolstripButton1.Visible = False
Re: [2005] Toolbar - Hiding Buttons
How do you normally hide something on a Windows form? The Visible property maybe?
vb.net Code:
If accessLevel < 3 Then
Me.ToolStripButton1.Visible = False
End If