|
|||
|
Ton, I am a bit confused by this. In your advanced example, two of the events are on a ref constant. How can you have an event on a ref constant? I thought that I understood what you were doing by registering a constant, you were turning off an event. I am trying to write a VI that allows a user to click and drag a data point on a graph. My intention is that on mouse up, the cursor is placed on a data point. If the cursor is on the correct data point, the user then could click and drag (mouse move enable) the y axis value of the point. Upon mouse up, the drag (mouse move) would be disabled again.
MouseEvents3.png: http://forums.ni.com/attachments/ni/...useEvents3.png MouseEvents1.png: http://forums.ni.com/attachments/ni/...useEvents1.png MouseEvents2.png: http://forums.ni.com/attachments/ni/...useEvents2.png |
|
|
||||
|
||||
|
|
|
|||
|
Hi Ben, that was my understanding of the gist of his posting, and that is what I am trying to do. What I don't understand from his picture are the two events on a constant (see attached). I also don't understand why mine is not working.
DynamicEvents.png: http://forums.ni.com/attachments/ni/...amicEvents.png |
|
|||
|
<img src="http://forums.ni.com/attachments/ni/170/342541/1/DynamicEvents.png">
The text shown in the header of the evnt structure comes from the code that executes out to the left. In that case, (I think) Ton was creating those events and registering them against the constant so that they would not be registered initially but only registered against the actual picture control when required. Sorry can't look at your other pictures now, gotta run! Ben |
|
|||
|
Hi, since you can't create event structures and event handlers during execution I use this technique (which is used by NI in their examples as well).You always need the event handler in the dynamic event parts (with the '<'). To unregister you need to feed a constant, you basically register for a control that does not exist.If you feed nothing the event will not be unregistered (just like an empty input to an unnamed cluster bundler).In your code you do the handling in static events, these be unregistered, you could do this by external coding, but it's much nicer to handle it with dynamic events.Ton
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: convert date to week | Ian Whitlock | Newsgroup comp.soft-sys.sas | 0 | 06-15-2005 02:58 PM |
| Re: convert date to week | nospam@HOWLES.COM (Howard Schreier | Newsgroup comp.soft-sys.sas | 0 | 06-14-2005 07:00 PM |
| Re: convert date to week | Schwarz, Barry A | Newsgroup comp.soft-sys.sas | 0 | 06-13-2005 07:14 PM |
| Re: Missing Values | Jim Groeneveld | Newsgroup comp.soft-sys.sas | 0 | 12-08-2004 07:45 AM |
| Missing Values | Bosch, Jules | Newsgroup comp.soft-sys.sas | 0 | 12-07-2004 04:28 PM |