06-29-2016 09:45 AM
I can't get a RichTextBox .NET control to generate any events. I am trying to trap the event where a user changes the text inside the RTF box, but I cannot get the callback VI to be executed.
The control is 'Setup'
The callback is simply supposed to add onto the queue (producer-consumer model) for the consumer to react to:
but I can't even get the callback code to execute no matter the event I register (shown above as 'Enter', but I've tried 'KeyPress', 'ModifiedChanged', etc. with no change to performance).
Am I missing something??
Solved! Go to Solution.
06-29-2016 09:51 AM
Does the Register Event Callback node throw an error?
It seems that you haven't wired up something on the error out and if you have automatic error handling diabled, you will not get notified....
Norbert
06-29-2016 10:01 AM
No errors. I had it wired up earlier to ensure that the code was executing when I expected it and didn't get any problems.
Just verified. No complaints from the Callback Registration node.
06-29-2016 10:18 AM
@thisisnotadream wrote:
[...] no matter the event I register (shown above as 'Enter', but I've tried 'KeyPress', 'ModifiedChanged', etc. with no change to performance).
Am I missing something??
Obviously, you have bad luck in choosing "compatible" events....
I confirm that Enter does not trigger the callback, however MouseEnter does.
I assume that some events are only triggered if the parent window is also created in .NET or work different as you'd expect them to do (regarding when the event occurs).
Norbert
06-29-2016 10:39 AM
That wouldn't normally shock me to hear that...however, I still get nothing.
I get the same 'nothing' results when running the attached code. When you execute, do you get the message popup from the callback that I would expect?
06-29-2016 10:45 AM
Having your code running in LV 2015 i don't get a message popup. However, if i remove your callback VI and create a new one, it works.
It seems that something is wrong with your callback VI itself.
Norbert
06-29-2016 10:48 AM
THAT'S IT!!!
I borrowed that VI online before I realized you could just right-click on the node. When I just let LV generate the VI, it works. Thanks!