the exact position of the mouse click xy graph while he plotted graph with mouse events

Hello

IAM using Graph xy for multi locations

IAM traced graphic with mouse movement and events using the example attached (draw the graph with mouse events)

but in sub vi Values.vi scale there are two constants 66 and 30 when I change my plot (I also change the scales), then the mouse position and chart position (cursor) value are not well aligned, but when I change the constants mentioned above I get the alignment perfect between the cursor and the last point in the path.

as I went to another parcel (with scalability again) the same alignment problem resurfaced.

I need to replace these two constants with something dynamic

Please help

concerning

Mazhar

solution to my problem is

Tags: NI Software

Similar Questions

  • WPF graphics, display plot marker (with contact information tooltip) on the mouse event

    Hello

    I need display the coordinates of the point of the field when the mouse pointer is positioned top/close to him.

    I already display a ToolTip with coordinates using the code in this LINK (works equally well for graph).

    However, it is not easy to see where the field is selected, especially when you have more than one land close to eachother.  Is there a way to display some sort of a 'marker '?  A bit of as Signal Analyzer?

    Thank you.

    If you want to display a target and the label next to the value as a user moves the mouse over a graphic, a possibility would be to use SetRelativePosition on a slider.

    If you want to just use a marker in the chart and keep the label in the ToolTip, you can set the relative position of a Visual in the Children collection:

    XAML

        

            

                

                ni:Cursor x:Name="cursor" />

                

                Ellipse x:Name="marker" Width="10" Height="10"

                         Stroke="Black" StrokeThickness="2"

                         niPrimitives:RelativePanel.RelativeHorizontalAlignment="Center"

                         niPrimitives:RelativePanel.RelativeVerticalAlignment="Center"

                         />

            

        

    Code

        private void OnPlotAreaMouseMove( object sender, MouseEventArgs e ) {

            IPlot plot = graph.AllPlots[0];

            Point screenPosition = graph.GetPlotAreaPosition( e );

            Point relativePosition = graph.ScreenToRelative( screenPosition );

    // Option 1

            cursor.SetRelativePosition( relativePosition );

    // Option 2

            PlotValue nearestValue = graph.FindNearestValue( plot, relativePosition, query );

            if( nearestValue != null ) {

                graph.ToolTip = string.Format(

                    "Nearest value is at ({0},{1}).",

                    nearestValue.Value.Cast( ).ToArray( ) );

    Point nearestValuePosition = nearestValue.GetRelativePosition( );

                RelativePanel.SetRelativeHorizontalPosition( marker, nearestValuePosition.X );

                RelativePanel.SetRelativeVerticalPosition( marker, nearestValuePosition.Y );

            }

        }

  • Newbie with the mouse event question

    Hello! I started playing with as3, and I have a function for mouse clicks that draws a shape on each click. However, the mouse click event does not appear to work except when I click on a MovieClip, that I placed in the middle of the screen. Is there a way to make the mouse click event recognize when I click anywhere on the screen?

    Thank you

    Will be

    public void newGame()

    {

    Avatar = new Avatar();                                                  Click the mouse entered only when you click on the avatar?

    addChild (avatar);

    avatar.x = mouseX;

    avatar.y = mouseY;

    addEventListener (MouseEvent.CLICK, clickHandler);

    gameTimer = new Timer (25);

    gameTimer.start ();

    }

    you need to add the event listener to the stage

    stage.addEventListener (MouseEvent.CLICK, clickHandler);

    However you must make sure that this step is not null

    If the code above throws an exception to reference null, you'll also need to add and ADDED_TO_STAGE listener

    post the rest of your code and I can help you with that

  • Default implementation of the mouse event drag?

    It is a default implementation of the mouse drag event?

    Say that if the developer does not override and implement the event drag the mouse, always when you drag the frame, the frame get painted himself in his new role. It indicates a default implementation of the event drag the mouse, but I am unable to know where it has been implemented.

    Why bother when everything is working well? I have a requirement to move my modeless dialog box when the frame is moved to another location. I tried to add mousemotionlistener from the frame to the Panel within a framework, but the event does not reach my custom mousedrag event implementation.

    Clues?

    Move the frame is a different listener: ComponentListener; Add on to the frame. The frame window decorations are part of the territory of OS, so I don't know if there is a dependency of the system. I think I remember vaguely some systems sending an event that once made the trip, while others send the event as the image moves.

  • The mouse event when the mouse is inside a link?

    Is a mouse event fired when the user moves the mouse over a link in a PDF file?

    If yes how can I register a listener for this type of event?

    No, only form fields have such events, and so-called "mouse enter.

  • Double-click the mouse events to change the display size

    Hello to everyone.

    Thank you very much for reading this post and be able to help.

    I have an image on the screen in front of the Panel.

    I would like that when users double click on it, the display size increases at a specific site for user ca better view.

    How can I do this event?

    Thank you very much.

    Here you can get information about how to create a mouse double click event:
    http://digital.NI.com/public.nsf/allkb/391D522B0FDD4B3F862571E300739F44

  • WPF IntensityGraph, value of the display on the mouse event cell

    Is there a way to display the value of a cell in a popup "as ToolTip' when you click over/hover anywhere on IntensityGraph?

    Thank you

    Using the technique of the point value of graphic display WPF overview, this is a specific version for intensity data:

    private static readonly GraphQueryArgs query = new GraphQueryArgs(
            PlotsToSearch.Any, SearchDimensions.HorizontalAndVertical,
            SearchDirections.ForwardAndReverse, isInclusive: true );

    public MainWindow( ) {
            InitializeComponent( );

    graph.PlotAreaMouseMove += this.OnPlotAreaMouseMove;
            graph.PlotAreaMouseLeave += delegate { graph.ToolTip = null; };
            ToolTipService.SetInitialShowDelay( graph, 0 );
            ToolTipService.SetShowDuration( graph, int.MaxValue );
        }

    private void OnPlotAreaMouseMove( object sender, MouseEventArgs e ) {
            IPlot plot = graph.AllPlots[0];
            Point screenPosition = graph.GetPlotAreaPosition( e );
            Point relativePosition = graph.ScreenToRelative( screenPosition );

    PlotValue nearestValue = graph.FindNearestValue( plot, relativePosition, query );
            if( nearestValue != null )
                graph.ToolTip = string.Format(
                    "Nearest intensity value is {2} at ({0},{1}).",
                    nearestValue.Value.Cast( ).ToArray( ) );
        }

  • Button on the mouse event

    Hello world

    So I've been playing with edge a lot lately, but there's just this thing that I was not able to understand.

    I want a button to shrink in size when someone clicks on it.

    I hosted it in the timeline in the following example: http://www.innua.ca/buttontest

    You see that on mouseover the opacity of the border goes from 20% to 80%, this is done with the following code:

    MouseOver

    sym.getSymbol("butt1").$("butt1_outline").css ("opacity",. 8);

    mouseout/mouseouthandler()

    sym.getSymbol("butt1").$("butt1_outline").css ("opacity",. 2);

    Now, when you click on it, you see the button decrease in size. Works perfectly; only I did manually in the timeline, so that is what I'm looking for the code to do.

    Preferably, I'd like to use transform: scaleX and scaleY and always shrink the key toward the Center.

    Can someone help me with this? Thanks a bunch!

    Here's another solution.

    Action click:

    .CSS ({$(sym.lookupSelector ("Rectangle"))})

    "transform": "scaleX (0.8) (0.8) scaleY", "

    "- ms-transform": "(0.8) scaleX scaleY (0.8)" ", / * IE 9 and 10 * /.

    ' - moz-transform ":" (0.8) scaleX scaleY (0.8) "", / * Firefox * /.

    ' - webkit-transform ":" (0.8) scaleX scaleY (0.8) "", / * Safari and Chrome * /.

    ' "- o - transform": "(0.8) scaleX scaleY (0.8)" "/ * opera * /.

    });

    Well, you can replace $(sym.lookupSelector ("Rectangle")) by $(e.target). This works.

  • target the properties of the mouse event: ROLL_OVER, MOUSE: DOWN

    Hi - I'm targeting the States of the button IE: ROLL_OVER is interpolated a bit bigger.

    So I want to go back to its original size.

    BUT it is not recognizing the start and reverse methods.

    Scene 1, Layer "layer 2", 1 environment, Line 60 1061: call to a method maybe not defined in advance through a reference with static type gs:TweenLite.»

    button.addEventListener (MouseEvent.ROLL_OVER, rollOverHandler, false, 0, true);
    button.addEventListener (MouseEvent.MOUSE_DOWN, mouseDownHandler, false, 0, true);
    button.addEventListener (Event.MOUSE_UP, mouseUpHandler);
    button.addEventListener (MouseEvent.ROLL_OUT, rollOutHandler, false, 0, true);

    var myTween:TweenLite = new TweenLite(button,1,{scaleX:1.05,scaleY:1.05,onComplete:myReverseFunction});)

    function rollOverHandler(e:MouseEvent):void

    {

    TweenLite.to (button, 1, {scaleX:1.05, scaleY: 1.05, ease:Elastic.easeOut});})

    myTween.start ();

    }

    function myReverseFunction (): void

    {

    myTween.reverse ();

    }

    There is no such method 'start' to TweenLite, because it starts immediately. If you want to reverse the Tween when it has finished the easiest is to use "yoyo" in TweenMax. (Although you can use onComplete so if you want to).

  • Why can I not download the files EN Adobe CS6 (while it works perfectly with CS 5.5)?

    This is an hour that I'm looking to download the files to install the CS 6 Design & Web premium and Adobe server won't transmit the two necessary files?

    There is - t - it a problem on the server or does still show several "white leg"?

    (pour the info, I support without concern the 8.8 version CS 5.5 GB)

    Downloads available:

    Download and installation help links Adobe

    Download and installation to Prodesigntools help links are located on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions". window using the Lightroom 3 link to see these "important Instructions".

  • How to make the difference between the mouse down events in the control of the chain (click on contour vs click Center)?

    Hello

    I have a control over the chain on my UI and I would like to make the difference between mouse different events, that is to say, to be able to differentiate a click on the outline or the label of the controller vs right-clicking on the Center (between the control in "edit" mode)

    The reason is that sometimes if the user does click not in the Center but in the scope of control, Labview fires the mouse event down but the typed keys are not registered...

    Is it possible to distinguish the two?

    Thanks a lot for your help

    Set the string "update as you type" and use instead a "changed value" event Now, the event fires whenever a new character is entered.

  • Event Structure... the mouse down or to the cases of change of value

    I feel, it is a simple problem, but I can't seem to find a solution.

    I have a VI that is supposed to communicate with a stepper motor drive.  I'm working on the Boolean setting keys on the Panel before (acting as of the momentary switches) that will jog the hourly engine or counterclockwise, as long as the button is pressed.  Once the user releases the button, the motor should stop jogging.

    I tried to use the mouse down and value change event.  With the help of the mouse down, for some reason, the time-out occurs almost immediately even while holding the mouse on the button.  This translates into what seems like nothing is happening.  Although the engine receives all orders he has to run, it receives the stop command immediately after.

    Using the value change case, the procedure works and the motor turns, but when you release the button (another change of value), all orders of jog are returned to the engine stop control tracking.  Sometimes the motor continues to run after the shutdown command has been sent, and I think that might be involved because it receives all the shortening of orders (again) and the judgment of control both.

    Is it possible to cnage my case event to run the way I want to what he... Send commands to the button click on... Send different command button.

    Thank you.

    Thanks for the suggestion...

    I could solve the problem I had.  Previously, I was trying to display the timeout to-1 to a value greater than 0 to launch the timeout on a button release event.  To solve the problem, I just removed all of the code that has been changing the value of timeout and left the default to-1.  I also removed all the code in the case of timeout.  Then, I created a new mouse event that is fired by releasing one of the buttons and copied in the code that used to be in the case of timeout.

    Now, the works of VI exactly as I need to... where an event occurs on a mouse a click of a button and a different event happes when the button is released.

    A very simple solution, however I've only worked in BT for about a week and I have not seen the mouse event when I scroll to the event.

  • Down on the Image, but not on the mouse scroll bar event?

    Hi all

    I use an event "Mouse Down" on an image to save the coordinates X and Y of the click and increment a counter.  My problem is that I'm looking at an image with a scroll bar that I want to use to set what part of the image is visible.  When I click on the scroll bar, I set off the mouse event down and increments the counter, which I won't do.

    Is there a way to implement a mouse event to the bottom so that it will ignore clicks on the image scroll bars?  If not, can you think of another way to accomplish what I'm doing?

    Thank you!

    Some quick ideas:

    The scroll bars will be a fixed height or width of the right or at the bottom of the indicator. In the mouse to the bottom of the event handler, if the click happens to a set of coordinates that are in a region of scroll bar, you know, do not increment the counter.

    OR

    Maybe you can overlay a transparent image control such that it covers the image but not the scroll bars, and find clicks on this second control.

    Mike...

  • Follow an event in a graph with the mouse cursor 3D

    I'm trying to track events in a 3-d Surface chart. I need track the mouse down and mouse up on top of the slider. Mouse works fine, but when I drag the cursor and let, mouse event does not get the subject of a follow-up, and I have to click the mouse button once to catch the mouse event. Any suggestions?


  • Right button of the mouse

    Hi all

    I have the obligation to post a selectManyChoice when clicking with the rigth button mouse in a specific area of the page to show/hide the components (in this case panelBox inside a dashboard) instead of having the component (selectManyChoice) visible where it is now, as you can see below:

    Is this possible?

    I ve fell on them:

    SCM: GUI manual - rotate, translate and Zoom

    How to write a mouse listener (the Java™ Tutorials > creating a GUI with JFC/Swing > writing event Li...)

    The right button of the mouse event

    But I wonder if there is a declarative better/alternative way to reach him with jdev12c.

    Best regards

    Carlos

    Hi Shay

    Good news, I was able to show wanted.

    Just create the context menu, add showpopupbehavior where I wanted to take the mouse right button, select contextmenu in TriggerType and put the selectManyChoice inside the popup code.

    I join the project for you (anyone) to have a look if you like, with a few comments in the code.

    Kind regards

    Carlos

  • the transparent parts of component prevents mouse events

    Hello

    I work with a bunch of components that are superimposed on top of eachother.

    Some of the components are odd-shaped and with a transparent background.

    When I try to click on items that are causing others the mouse event is not fireing.

    is there a way I can fix this?

    Drew

    There is a difference between transparent and no background background.  If I take a Sprite and draw a triangle filled like this:

    moveTo (0,0)

    lineTo (100, 100)

    lineTo (100, 0)

    lineTo (0,0)

    Then any component under half, I don't draw is 'visible' mouse and my Sprite get not mouse events.

    If I fill this area with a background with alpha = 0, so I actually placed a piece of glass in my component and it will get the mouse events, even if you can see through things behind him.

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

Maybe you are looking for

  • Why gmail does not work on thunderbird?

    It retains this doing and I'm following the directions. I have my pop and inappropriate settings on active gmail. Link to the image of my http://i282.photobucket.com/albums/kk278/youtob/2014-10-10_12-42-27.jpg problem

  • USB on Portege R700-M14 questions

    Hi all I have a problem with the usb ports. When I take her to the hibernation mode or standby, all environment stuck to USB1 and USB2 ports usb devices (printer, mouse, etc.) can not any action. But USB3 (E-sata/USB) port, still works correctly. Whe

  • Automatically put the cursor in the text box to start

    Hi guys On the picture below you can see a small piece of my FP. It is a part of a bigger FP for a pretty huge electronics test. Each PCB got its own series number of barcode. I have a drive that is connected to my keyboard. Then when I read the code

  • OfficeJet 4630: 4630 Officejet won't print black ink

    My Officejet 4630 is 6 months old. I bought it when my previous HP printer (which was more than 2 years) stopped printing black ink. This printer is doing the same thing. I searched the forums and the internet for a solution, nothing works. I just ch

  • HP OfficeJet 5610xi all-in-one: windows 10

    After you have installed Windows 10, I get the following error message when you try to print from applications: We could not reach this printer. Make sure that the printer is turned on and that you are connected to the network printer, or try a diffe