Knowledgebase Home Page  >  RapidSpell Desktop .NET  >  Appearance Customization
Search the Knowledge Base
How can I disable the Change / Change All buttons programmatically? (C#)
https://keyoti.com/kb/Default.aspx?ToDo=view&questId=143&catId=63

Options

Print this page
Email this to a friend

You can customize the GUI through our custom GUI mechanism, as per the example in the product demo project.

The simplest thing to do is to add this method to the CustomGUI class (see the demo)

protected override void Resume()

{

base.Resume ();

changeButton.Enabled = false;

changeAllButton.Enabled = false;

}

 

If however you need to set the button state programmatically, you can pass through the setting like this;

 

class CustomUserInterfaceFormProvider : IUserInterfaceFormProvider {

public bool ChangeAllowed{

get{return _changeAllowed;}

set{_changeAllowed = value;}

}

bool _changeAllowed = false;

public IUserInterfaceForm CreateUserInterfaceForm(){

CustomGUI f= new CustomGUI();

f.ChangeAllowed = ChangeAllowed;

return f;

}

}

public class CustomGUI : RapidSpellGUI

{

bool _changeAllowed = true;

protected override void Resume()

{

base.Resume ();

changeButton.Enabled = ChangeAllowed;

changeAllButton.Enabled = ChangeAllowed;

}

public bool ChangeAllowed{

get{return _changeAllowed;}

set{_changeAllowed = value;}

}

 

}

 

 

and then set the property in your UI provider instance

provider.ChangeAllowed = false;

 

 


Related Questions:

Attachments:

No attachments were found.