04-15-2024 11:19 AM
Sounds a bit silly I know, but I ran across some unexpected behavior with this QControl today. The initialization VI "New RichTextBoxWithToolbar" vi returns the "RichTextBox Value Change" user event refnum, which ostensibly lets the user know when the value changes. However, it only seems to fire when the toolbar buttons change the value. Simply typing into the text box doesn't fire the event.
Is this expected behavior? Here's the Event Handler:
All of those Value Change events do "some stuff" then calls ValueChangeEvent.vi which notifies the caller that something changed. I'd expected to see a "Reference" value change event (Reference is the name of the text box's refnum).
Is there any harm here in adding that event case to the EventHandler.vi? If the intention is to put that in the caller's Event Handler then I can put it in the caller, it just seemed a little odd to have a "value changed" event that doesn't fire when ONLY the value changes. (I also don't like editing toolkit functions, since they're not stored with my project in source control).
Solved! Go to Solution.
04-29-2024 05:18 PM
I reread my post and realized it's a little obtuse- my question is, "Should typing a value into the text box trigger the exported Value Change event in the QControl event handler?" It currently does not.
04-29-2024 07:29 PM
I guess it can. I don’t think it would break anything if it did. Then only the user event is needed when anything changes to the string.
Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner
04-30-2024 12:30 PM
Thanks- I was wondering if you'd intended for it to use a separate value change event case rather than the "baked in" one, and if there might be some good reason to do it outside of the QControl.