Reply

How to disable command button and menu item

[ Edited ]

 

Hi all

How to disable (hazed) a commandbar button?

How to disable (hazed) a menu item?

 

I tried the following, but not works

commandbarbutton.disable=false

 

Posted by: jaya priyan
Post date: 1/20/2008 8:39:50 PM

4 REPLIES

RE: How to disable command button and menu item

[ Edited ]

Jaya,

 

If you're referring to an addin, you need to read "C:\Program Files\Solid Edge VXX\SDK\Samples\Addins\Doc\addin.doc".

 

Specifically, page 183, OnCommandUpdateUI.

 

Posted by: Jason Newell
Post date: 1/21/2008 6:04:02 AM

RE: How to disable command button and menu item

[ Edited ]

Thanks for your information Jason

 

This did the trick

 

Private Sub OnCommandUpdateUI(ByVal nCmdID As Long, lCmdFlags As Long, MenuItemText As String, nIDBitmap As Long)

 

lCmdFlags = seCmdActive_UseDotMark

nIDBitmap = 1

 

End Sub

 

Posted by: jaya priyan
Post date: 1/22/2008 10:07:35 PM

RE: How to disable command button and menu item

[ Edited ]

Can you give me an example?

I don't know how to use it.

Thanks.

 

Posted by: illuminiti illuminiti
Post date: 4/27/2011 11:18:58 PM

RE: How to disable command button and menu item

[ Edited ]

 

Technally speaking, set the value to zero. Add-in commands are assumed to be enabled (value on input should be 0x1).

 

For c++ you can do this:

 

*lCmdFlags &= ~ SolidEdgeConstants::seCmdActive_Enabled;

 

That would clear the bit that enables the command. Or just

 

*lCmdFlags = 0;

 

Posted by: R.D. Holland
Post date: 6/20/2011 6:26:01 AM