Picture control mouse property

In LV 8.5 I notice that if you reinitialize your picture control to default value (using pop-up menu) the mouse position property no longer works, it will always return 0,0 no matter where the mouse is in the control.  You must destroy and re-create your picture control to fix it at that point.
Maybe this has been fixed in later versions of LV but I have not seen any documentation of this.
Solved!
Go to Solution.

Good Afternoon Garvacious,
When you say the pop-up menu, I assume you mean the menu that appears if you right-click on the control.
I just tried this in LabVIEW 8.6.1.  My mouse cursor position reads 0,0 when the mouse is over the control and -1,-1 when the mouse is not over the control.  This is a bug.  I have filed the appropriate internal documentation (Corrective Action Request #167102) so that R&D is aware of the issue.
Thank you for letting us know about this behavior.  I am sorry for any inconveniencce this bug has caused you.
Regards,
Charlie Piazza
Staff Product Support Engineer, RF
National Instruments

Similar Messages

  • How can I determine mouse position within a 2D picture control

    I have an application where I'd like the user to be able to interact with objects drawn in a 2D picture control using the mouse.  In order to do this, I need to translate between screen coordinates, which are passed with the mouse events, and coordinates in the 2D picture control.
    The problem I'm running into is that I can't find a way to determine the screen coordinate of the upper left hand corner of the 2D picture control's drawing/client area.  I tried using the picture control's "Position" property, but this results in an offset due to the difference between the upper left hand corner of the picture control (including the label, etc.) and the upper-left hand corner of the drawing area.  See attached VI.
    Does anybody know how to get the screen coordinate of the corner of the picture control's drawing area?
    Mark Moss
    Solved!
    Go to Solution.
    Attachments:
    2D Picture Mouse Test.vi ‏27 KB

  • Problems with Mouse Down event for a picture control embedded in tab.

    I noticed that when trying to get a Mouse Down event for a picture control that the Mouse Down will not be 'fired' if the picture is embedded in a tab control. It also appears that this problem exists for other controls (I only tested a slider in addition to the picture). It isn't much of an issue for me now as I can just poll the mouse property of the picture control, but the Mouse Down event has information that I may want access to in my next software revision (button pressed, and Alt mod). I could do that by handling the Mouse Down event for the tab itself and checking to see if the the mouse property isn't -1, -1 for the picture, but that seems a little bit too kludgy (sp?) to me and wouldn
    't address the issue with other control types. Any chance of this being addressed by a patch sometime in the next couple of months???
    Attachments:
    TabProblem.vi ‏69 KB

    The problem I reported above was in LV 6.1.
    As a work-around, I used the mouse down on the tab control and did the math to decide if the picture was clicked.
    I have been told that this was fixed in LV 7.0. I can not confirm.
    You could call NI and ask about the service request number I cited above.
    I hope this helps,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • PDA Mouse Down Event on Picture Control

    While using the Mouse Down Event on the Picture Control for LabVIEW 7.1 PocketPC PDA, I want to get the xy coordinates on where the user tapped on the pict control. Any ideas or workarounds?
    Robert

    Hello Robert �
    What do you mean by �outputting individual horizontal and vertical components�?
    In the LabVIEW PDA module (and this applies to PocketPC and PalmOS), clusters will not show up in the PDA�s screen. You can use clusters to group controls/indicators but when there is need of sending a new value/showing the value in the screen, the bundle and unbundled functions have to be used, so that you can have individual controls/indicators to pass a new value/see the value, respectively.
    So, from the Coords terminal in a Mouse Down/Up event, you need to unbundle the cluster and create individual indicators for each, the horizontal and vertical position.
    I am attaching an example to show you what I mean. For PalmOS, the same applies.
    H
    ope this helps and if I misunderstood your post, please let me know.
    Have a great day.
    S Vences
    Applications Engineer
    National Instruments
    Attachments:
    PPC_Picture_Events.vi ‏30 KB

  • Mouse down on 3D picture control

    Hi,
    i would like to know how to indicate mouse down on the 3D picture control as can be done for the picture function.
    http://forums.ni.com/ni/board/message?board.id=170&message.id=49423&query.id=66219#M49423
    regards
    king1

    Hi King1
    I have been able to modify an example VI which came with LabVIEW v8.2 which uses the 3d picture control. I have added an event structure to the code which allows the user to pause the rotation of 2 objects in the picture display area. I have added notes to the block diagram which should help in describing its behaviour. the file is attached with this post.
    I hope this is of some help, there are a few more 3d picture examples in the LabVIEW example directory which might also be of use.
    Best wishes
    Rob L
    Rob L
    NI Applications Engineer
    UK & Ireland
    It only takes a click to rate this message ;-)
    Attachments:
    3D Picture with User Selection.vi ‏61 KB

  • How control can be customized so that it changes its picture when mouse moves over it

    How control can be customized so that it changes its picture when mouse moves over it. As it happens in other develpment enviroments that one can customized the look 'n feel of any thing during the mouse movement over that very thing. Moreover can any body plz tell me that how one can modify the funtionality of a control by him self (not selecting the available functionalities of controls and indicators)

    The attached LV 7.1 code uses an event configured to trigger on two controls when a "Mouse Enter" or a Mouse Leave" event occurs. Depending on the type key focus is either assigned or removed.
    Please elaborate on the Q re: customizing a control.
    Ben
    PS Do NOT change the boolean to an indicator, save, run, change to control, save run again. That is bad.
    Forgot to attachMessage Edited by Ben on 05-05-2005 09:30 PM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    MouseOver.vi ‏28 KB

  • How can I set the caption text of picture controls inside an array or how can I choose which array element is assigned using the array elements caption text property.

    I have 8 picture controls inside an array and I would like to set the caption text of these controls.
    I have used the property node of the array and used the array elements property caption text to set the text.
    The problem is however that I set the same text to all the picture controls inside the array.
    My question is how to set caption text of specific elements (Picture control) that I have so far only been able to access using the array elements caption text property.

    Some more help
    1 You could use the caption of the array and place it in front of the selected picture and update that using property nodes.
    2 Like Norbett said if you use a cluster of pictures then their caption can be updated individually.
    Here is a an example that demonstrates the above
    David
    Attachments:
    Modify the Captions Of Pictures.vi ‏83 KB

  • Limit control to property of a waveform graph

    I have a waveform graph in which I would like to limit practically all the property of the contextual menu. Such as:
    Visible items, Auto scale X and Y...
    There is a way to do that. By setting "Disabled" to 1.
    My problem: I would still like to let the user change the Y scale by double clicking it.
    Thanks
    Nitrof

    Nitrol,
    Unless I'm mistaken (it happens), the only way to really do this is completely disable all functionality and add the functionality back through your front panel. I would suggest a very easy approach by putting two digital controls (or one array with two elements, or a cluster, or...) which would be the min and max of the Y scale. You can even make it more simple by just adding a Property Node of the graph, selecting the Y scale, and creating a control. That would save you a lot of work. It wouldn't be as neat and tidy, but it would get the job done with the least amount of work.
    If you want to know how to do this exactly as you specified, here goes:
    Place a picture control over the y scale of the graph. Make the picture invisible (the "T"
    color for the frame and the drawing area. Then, with the picture selected, move it to the front. Next, in the diagram, get the mouse down data from the Mouse property in a while loop. Throw the mouse down data into a shift register. Make the loop have a delay (wait) of about 200ms. AND the output of the mouse down button with the previous one. When the output is true (of the AND), stop the loop. You have detected a double click of the Y scale. NOW, you have to add a subVI that pops up (dialog) options for the Y scale. The user will change the scale, and then you can input these into the Y scale of the graphs property node. Yes, its quite complicated, but the results are exactly what you are looking for.
    Of course, I always recommend the KISS principle (Keep It Simple Stupid).
    Good luck

  • How do I apply a texture to an imported .stl file in 3D Picture Control?

    Hi, I'm trying to apply a 2D image as a texture to an imported .stl file in 3D picture control. It works fine if I'm using a standard shaped mesh created in LabVIEW, however is there a way in which a texture can be applied to an imported model that isn't a standard shape, in my case a balloon. I've attached the an image of the Sub vi where I apply the texture. The object just shows up as a flat colour. Do I need to define how the image is applied to the mesh due to it being a non-standard shape? If so, any pointers would be appreciated.
    Many thanks.
    Oh, I'm using LabVIEW 2009 SP1.
    Attachments:
    stl texture problem.jpg ‏60 KB

    Apologies, been trying all afternoon and then a couple of minutes after posting, I figured it out. Using a property node for the Scenemesh reference, I set the property TextureGenMode to Spherical and it appears to now display the texture on the mesh.

  • Inserting a small graphics in a picture control

    Does any one have an example code for inserting a small graphics/8 bit bmp file (15x15) in a relatively large (240x360) 8 bit jpeg image at known location in LabVIEW using Picture Control? Thanks in advance.

    Hello,
    To read an image file (BMP, JPG, PNG) and put it into a picture control you can use the OpenG function "draw image from file", and then use the picture control property "Zoom" to fit it correctly.
    Here's an example :
    You can get OpenG functions from here.
    Hope this helps.
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • 2D picture control doesn't refresh properly

    I have an application which displays a picture in a 2D picture indicator and draws a few rectangles and lines on top of the picture. 
    The locations of these lines change throughout the day, and the application is designed to run minimized and then provide a quick-look at various status items when it is restored by the user.
    While minimized however, the image does not appear to get updated, even though my code is updating it once per second. I can't actually tell what happens when it's minimized obviously, but the behavior persists for some time after the window is restored, and the state it is 'frozen' at is from the time it was minimized.
    There are other digital indicators on the front panel getting updated in the same 1Hz loop, so I know it is just the 2D picture indicator that's not working--i.e., something with LabVIEW or system related is causing the image not to refresh while it's minimized, and more importantly, for some time after the application is restored.
    Some things that will cause a successful refresh to the displayed image after I restore from the task bar to a stale display:
    Minimize again, then restore again (of the LabVIEW window)
    Probing the datapath on the BD for the final Draw Line output that connects to the indicator
    Waiting for awhile (15 seconds? 30 seconds?)
    I also tried setting the following property node with no effect: 
    VI > Panel > Defer Panel Updates > Set to False
    Another way to think about this would be to imagine a 2D picture control with an analog clock, where lines are drawn for minute and hour hands, and updated once per second.  This is not what I'm doing but the example is easy to understand.  When the application is restored from the taskbar, the clock appears frozen in time from the last time it was minimized.
    Same behavior running this in LV 2012 and 2013... I am looking for any other property nodes or refresh methods to force a refresh at 1Hz, regardless if the display is visible.  The display should be immediately up-to-date when the application is restored by the user.
    Solved!
    Go to Solution.

    You could try looking at the panel resize event (to recognize the restoring) and then force an update using one of the following methods (I have no idea if they will help):
    Set defer to T and only then to F.
    Set defer to T when minimizing.
    Set the FP window state to something else (hidden, minimized, etc.) and then to standard. This should ideally do the same thing you did with minimizing and restoring again.
    Use the window position property to place the window off the screen and then back in its original position.
    See if you can toggle the synch. updates property programmatically.
    Have a hidden control displayed over the picture control and then hide it.
    Try to take over the world!

  • 3D Picture Control Orthographic View zoom - Camera Set up?

    I am trying to display two 3D picture controls.  One displays some objects in 3D (Auto Projection: Perspective, Camera Controller: Spherical).  This 3D image works great and I am having no problems with it.  The other Picture Contol is meant to simulate a 2D image of the 3D object, essentially a Plan View.  To do this I made a 3D picture control with a Orthographic view.  I set the camera to view from above (z-axis) and set the target to be positive y-axis. 
    I have attached an example vi (labview 2013 SP1) that creates some simple 3D objects and displays them in Perspective and Orthographic using the same Camera Position.  On initial start, the Orthographic image is zoomed in heavily. If I manually zoom it (Hold Shift button and mouse up or down), then the Orthographic image will set itself to the correct Camera position.  This is essentially the solution to my problem, but I can't assume the user will have the ability to manually zoom the image.  So I need to set it programmatically.
    If you manual adjust the view on either screen (rotate and zoom), then click the Set Camera button, both images will give a plan view, but only the Perspective Image will be at the correct camera zoom or distance.  The Orthographic stays at the last zoom distance.
    Is there any way to set the Camera distance for Orthographic projection programmatically?   I have tried starting with the 3D picture control as perspective, set the camera distance and then changing it to orthographic, but this still results in a zoomed orthographic image.  From the reading I have done, I think I am trying to the impossible.  Does any one have another suggestion to get the same result.  I have previously used the 2D picture functions to generate the image but found that method inefficient. 
    And suggestions would be great.
    Thanks
    Relec
    Attachments:
    3D_projection_Test.vi ‏38 KB

    Hi Relec,
    thank you (and Kudos) for that inspiring demo!
    Took me while to work it out, but I might have found something that could help us with the orthographic projection.
    Sometime back someone posted a way to collect the current Camera data. Sorry I lost the source. But here is my version as a Get3DCameraPosition.vi using the ModelViewMatrix.
    Unfortunatly this doesn't return the current Target and so a bit of guessing in the right Direction is necessary.
    I'm impressed you found a way to make the Shift-Drag Zoom-movement possible on the orthographic window.
    It seems a whole thread at http://forums.ni.com/t5/LabVIEW/3D-Picture-Control-Doesn-t-Zoom-in-Orthographic-Mode/td-p/1544460/page/2 wasn't able to find that out.
    In the meantime I've found a way using the ProjectionMatrix to create a zoom-effect which I build into your demo using the mouse wheel.
    All in all I've tried to translate camera movements from the perspective window in the ortho - assuming this is what you were after?!
    Again the missing target information doesn't make it quite right.
    Regs
      Jannis

  • I want to know how to draw arrows & dashed lines in a picture control

    I have to draw arrows & dashed lines in a picture control. Just like we can do that in word or paint etc. I need to do the same using the mouse and drag the line/arrow till I realease the mouse. I am able to this for a normal line ( it works perfectly) but when I have to draw an arrow or a line I am stumped.

    Unfortunately, you have to code your own VIs to do these. It's not going to be too complicated if you manage the animation (while dragging the mouse) with a normal line and draw the dashed line/arrow at the end (when releasing the mouse button).
    In both cases, you'll know start/end line coordinates, thus having the line equation. For arrows, you need to calculate the angle in order to draw it properly.
    A simpler solution may be an activeX control with these features (Paint like) already integrated or to develop one in Visual Basic (at least it will be simpler to manage mouse events and drawing tasks).
    Let's hope somebody already did it and wants to share.

  • How could I possibly remove the default picture in the picture control?

    I've been using the picture control and a bit of code to create a zoom effect on a picture. It all works great however I get a labview picture when the Vi is first loaded. I'm trying to get a blank area instead cause it doesn't look really tidy!
    I've attached a picture and my code.
    Thanks for your help
    Solved!
    Go to Solution.
    Attachments:
    Picture Zoom.vi ‏100 KB

    The image is configured to be the default value of "Picture". In other words: you have to get rid of the default. You can do this by either:
    a) Delete "Picture" and create it again. Disadvantage: You have to recreate all property nodes connected to this control.
    b) Load an empty picture and then select "Data Operations >> Make Current Value Default".
    hope this helps,
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Set 2d picture control image

    I'm making some palette installers for ease of distribution for some libraries I have written. I'm following the example VIs (search the example finder for "palette API").
    I'm having some frustration in setting the new palette icon; the icon constant is a 2d picture control but I can't find a way to drop my image into it, and I can't set it programatically as the 2d picture control VIs only allow me to draw shapes into it.
    - Cheers, Ed
    Solved!
    Go to Solution.

    In cases like this I often resort to using a transparent classic path as an overlay to catch dropped files.  If you do not plan on interacting with the picture control, it is quite easy.  Otherwise it is just a few more events to control visibility when the mouse enters the VI with the button pressed.
    Just run the VI and drag PNG, JPG, or BMP files to the picture control.
    Attachments:
    DragToPictureControl.vi ‏16 KB

Maybe you are looking for

  • Downloads not saving to Downloads folder

    Downloads are not saving to the designated "Downloads" folder in My Documents. Instead, they are saving to C:\Documents and Settings\{username}\Local Settings\Temp. Tools/Options setting is pointed at Downloads, but the files just aren't saving there

  • How to Use Interactive Forms in BSP Applications - trouble with demo

    Is anyone else out there having trouble with the subject how to guide? https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0e58022-2a39-2a10-69a8-c1a892e2b3f4 I think I have everything built out correctly but I get the following run

  • Query in Insert statement with JDBC Rx adapter

    Hi, This is a FILE to JDBC scenario. My target datatype is like this with sample payload values statement_s statement_s    action='INSERT"   access     A=1234     B=1002 key    A=1234    B ="10%"      compareOperation= LIKE A(1..1) is primary key in

  • AirPrint and pdf password protected file issue

    Hello I'm facing issue while printing pdf password protected file via Airprint. From my iPhone /iPad I can print without any issue to my HP dj 2540 almost everything except pdf password protected file. The same pdf file (protected with password) can

  • Sequences in order - 10g r2 RAC

    Hello, we have a j2ee application against Oracle 10g r.2, which uses sequences (over ten approximately). These sequences are used to assign automatically value to the primary key of registers of several tables. In production environment, we have RAC