LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mouse position in picture control - LV8.2 - need a sanity check

Actually, the problem seems to be deeper than just a zoomfactor of zero. However, setting the zoomfactor once to anything, even a "new zero", clears the problem.

Setting a zoom factor of zero is actually equivalent to setting the zoom factor to 1 (should be documented in the help, but isn't). In this particular case, we can:

  1. read the zoomfactor with a property node and send it to an indicator. Zoom factor is zero.
  2. change the same indicator to a control (leave at the same zero) and set the property to write.
  3. Run the VI.
  4. ---> now the mouse position is reported correctly!

As the zoom factor gets smaller and smaller, the image gets smaller and smaller and the mouse coordinates grow without bounds. However a zoom factor of exactly zero will draw the image 1:1 and the coordinates reported are correct for that.

My best guess is that there is at least on other thing internally inconsistent or corrupt (Darren was right after all, even though a description alone cannot corrupt an image indicator) and setting the zoomfactor property unscrambles the problem. Interesting!

If we create a new picture indicator and read out the zoomfactor, it is "1".

We can duplicate the incorrect behavior (position always zero) by setting the zoomfactor to "NaN" or "Inf", for example but if we would load an image, it is not visible. In the current, unmodified VI, the image is visible at 1:1.

Message Edited by altenbach on 09-23-2007 09:22 AM

Message 11 of 14
(729 Views)

OK, I guess that means the control is corrupted and that there is need to investigate. Smiley Happy



___________________
Try to take over the world!
0 Kudos
Message 12 of 14
(722 Views)
I wasn't claiming the description could corrupt the picture control...I was pointing out that given its populated description (which looks an awful lot like NI documentation), this picture control probably came from some specific location...a toolkit VI, a certain palette, etc.  It would probably help us further diagnose the problem if we figured out, given that context help description, where the picture control came from.
 
-D
Message 13 of 14
(712 Views)

Ok - I am back from a busy weekend and surprised to see all of this activity.  Yes, this control innocently was dropped from an NI toolkit VI under development.....which is why right after I originally posted I thought I should probably try to drop a fresh picture control and see if I ran into the same problem....Thanks for all the folks who looked into this.

 

Sincerely,

 

Don

0 Kudos
Message 14 of 14
(694 Views)