Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to disable button until the value is selected c#

private void richTextBox1_SelectionChanged(object sender, EventArgs e)
{
    if (richTextBox1.SelectedText != null && !string.IsNullOrEmpty(richTextBox1.SelectedText))
        button2.Enabled = true;
    else
        button2.Enabled = false;
}
 
PREVIOUS NEXT
Tagged: #disable #button #selected
ADD COMMENT
Topic
Name
3+1 =