Select to view content in your preferred language

Enable/Disable IToolbarItem

545
1
05-28-2010 10:41 AM
GustavoFerrero
New Contributor
Hi All,

I've created a AxToolbarControl which contains some commands. I need to hide or disable some command on this toolbar. However, I was not able to find the way to do that.

Does anyone know how to do that (disable a tool bar item)?

Thanks in advance.
Gustavo.
0 Kudos
1 Reply
GuillermoMarinez
New Contributor
Hi
each command class have a enable property , you can override this property like this:
Public Overrides ReadOnly Property Enabled() As Boolean
    Get
      Return enabed_or_not_enable_custom_function()
    End Get
  End Property
0 Kudos