Is there a way to detect when user has pasted text into the textbox? I don’t see any obvious events.
In Winforms, this was possible by subclassing WM_PASTE in WndProc
, but obviously that’s not possible in WiseJ.
P.S. Using WiseJ 2.2.x
Hi Matthew,
You can add a “paste” event listener for your TextBox widget.
You can do it by adding
this.getContentElement().addListener('paste',(e)=>{ this.fireWidgetEvent("paste",e); })
to the InitScript property of your textbox, then you’ll need to handle the “WidgetEvent”, it should look like this:
private void textBox1_WidgetEvent(object sender, WidgetEventArgs e)
{
if(e.Type == "paste")
{
AlertBox.Show("Hi");
}
}
HTH,
Alaa
Please login first to submit.