Tools events are not fired in disabled TextBox

0
0

Dear Team,

 

Here is a case when an internal state of Tools on a TextBox is not set properly, when the TextBox is disabled initially in the constructor.

The ToolClick events are not fired.

public partial class Window1
: Form
{
public Window1()
{
InitializeComponent();

// in this constructor, the following line affects the internal state of the textbox’s tools.
// no click events are fired, even the control is subsequently enabled or disabled.

tbWithTools.Enabled = false;
}

Random rnd = new Random();
private void textBox1_ToolClick(object sender, ToolClickEventArgs e)
{
lbStatus.Text = rnd.Next(0, 1000).ToString();
}

private void btnEnable_Click(object sender, EventArgs e)
{
tbWithTools.Enabled = true;
}

private void btnDisable_Click(object sender, EventArgs e)
{
tbWithTools.Enabled = false;
}
}

Attachment
  • Kizaemon
    Same behavior if the TextBox is disabled in Load or Shown events. private void Window1_Load(object sender, EventArgs e) { tbWithTools.Enabled = false; } private void Window1_Shown(object sender, EventArgs e) { tbWithTools.Enabled = false; }
  • You must to post comments
0
0

Hi Kizaemon,

the fix for WJ-9131 is included in Wisej build 1.5.12

Best regards
Frank

  • You must to post comments
0
0

Hi Kizaemon,

thanks for reporting this. I have logged it as WJ-9131.
We´ll inform you when it´s fixed.

Best regards
Frank

  • Kizaemon
    Works now. Thank you very much.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.