Knowledgebase Home Page  >  RapidSpell Desktop .NET  >  Behavior Customization
Search the Knowledge Base
Can I make the change / change all buttons disable/enable based on the number of suggestions, like the spell checker in Word?
https://keyoti.com/kb/Default.aspx?ToDo=view&questId=195&catId=62

Options

Print this page
Email this to a friend

To have the change buttons disabled when there are no suggestions, unless

the user makes an edit to the query word, implement a custom UI and make

some slight changes.

If you look at our CustomGUIView.cs file in the demo project, you can

easily customize the behaviour of the UI. Eg. change these methods

public object SuggestionsListItems{get{return

this.suggestionsList.DataSource;}

set{

suggestionsList.DataSource=value;

 

ChangeButtonEnabled = suggestionsList.Items.Count != 0;

//add this

ChangeAllButtonEnabled = suggestionsList.Items.Count != 0;

//add this

}

}

and

 

private void queryWordPane_KeyDown(object sender, KeyEventArgs e)

{

if (e.KeyCode == Keys.Back && queryWordPane.SelectionStart ==

editableStart)

e.SuppressKeyPress = true;

if (e.KeyCode == Keys.Delete && queryWordPane.TextLength - queryWordPane.SelectionStart == editableEndFromEnd)

e.SuppressKeyPress = true;

if (e.KeyCode == Keys.Enter)

e.SuppressKeyPress = true;

 

ChangeAllButtonEnabled = true; //add this

ChangeButtonEnabled = true; //add this

}

 

 


Related Questions:

Attachments:

No attachments were found.