LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Month Calendar Value Change Event Case not working

Yet another problem I'm having with the MonthCalendar control:

When I try to set an event case structure with the "Value Change" event for the MonthCalendar control, it never executes. MouseDown works just fine, but Value Change is completely dead. Is there some special magic I have to do to make it do what it should obviously be doing? The Value Change event for other LabVIEW controls works.

____
Ryan R.
R&D
0 Kudos
Message 1 of 5
(3,561 Views)
Are you referring to the MonthCalendar control that's in the .NET palette? If so, then that's a .... .NET control, not a standard LabVIEW control. Thus, you have to use .NET callbacks to handle events for the control. Take a look at the example that ships with LabVIEW. Help -> Find Examples, and search for ".net".
0 Kudos
Message 2 of 5
(3,546 Views)
Thank you for the help. I was able to use the example to get values to change in a control on my front panel, but I don't see how to pipe that into an event structure as it doesn't seem to accept Callback refnums as inputs. I'm still experimenting, and I'm not getting anywhere.
____
Ryan R.
R&D
0 Kudos
Message 3 of 5
(3,537 Views)

You can't "attach" callback refnums to the event structure. You can do this several ways. Here's 2:

  1. Have to use a dummy control and pass the reference of that control to the callback VI so that it sets the "Value (signaling)" property of the control. Then you can register the "Value change" event for that dummy control. Again, in the Example Finder search for "callback" and open the example "ActiveX Event Callback for IE". It's an ActiveX example, but the same principle applies.
  2. Similar to the above, but use user events instead of a dummy control. In the callback VI fire the user event. The Example Finder contains a "Programmatically Fire Events" example that shows you how to use user events. 
0 Kudos
Message 4 of 5
(3,534 Views)
Thanks! I had never used "Value (signaling)" to set the value, but now it makes perfect sense. That was the key I was missing. Thanks a lot!
____
Ryan R.
R&D
0 Kudos
Message 5 of 5
(3,523 Views)