Monday, April 27, 2009

Ways to Disable ButtonEdit

To disable ButtonEdit Editing and Button click, but still allowing Selection and ContextMenu

  buttonEdit1.Properties.ReadOnly = true;

To disable ButtonEdit Editing, Selection, ContextMenu, but still allowing Button click

  buttonEdit1.Properties.TextEditStyle = TextEditStyles.DisableTextEditor;

To disable ButtonEdit Right-Click Context Menu

  ContextMenu emptyMenu = new ContextMenu();
  buttonEdit1.Properties.ContextMenu = emptyMenu;

To disable ButtonEdit completely

  buttonEdit1.Enabled = false;

No comments:

Post a Comment