Graph cursor move by keyboard

I have ComponentWorks 3.01 and VB
is it possible to move the cursor of a graph
BY KEYBOARD
When i use mouse ok, but not keyboard
Thank you

There is no direct support for this in the graph. The thing that's tricky about this at the graph level is how would you select the cursor that you want to move if you had multiple cursors in the graph?
Assuming that you only have one cursor, the code snippet below will move the cursor left and right by one point by pressing the left or right arrow keys. To run this example, create a new project in VB6, add a graph to the form, and then paste this code:
Private Const NumberOfPoints = 50
Private Const LeftArrowKeyCode = 37
Private Const RightArrowKeyCode = 39
Private Sub CWGraph1_KeyUp(KeyCode As Integer, Shift As Integer)
If CWGraph1.Cursors.Count > 0 Then
Dim cursor As CWCursor
Set cursor = CWGraph1.Cursors.Item(1)
If KeyCode = LeftArrowKeyCode Then
If cursor.PointIndex > 0 Then
cursor.PointIndex = cursor.PointIndex - 1
End If
ElseIf KeyCode = RightArrowKeyCode Then
If cursor.PointIndex < NumberOfPoints - 1 Then
cursor.PointIndex = cursor.PointIndex + 1
End If
End If
End If
End Sub
Private Sub Form_Load()
PlotSampleData
InitializeGraphCursor
End Sub
Private Sub PlotSampleData()
Dim data(NumberOfPoints - 1) As Double
Dim i As Integer
For i = 0 To NumberOfPoints - 1
data(i) = Rnd() * 10
Next
CWGraph1.PlotY data
End Sub
Private Sub InitializeGraphCursor()
Dim cursor As CWCursor
Set cursor = CWGraph1.Cursors.Add
Set cursor.Plot = CWGraph1.Plots.Item(1)
cursor.PointIndex = CInt(NumberOfPoints / 2)
cursor.SnapMode = cwCSnapAnchoredToPoint
End Sub
Hope this helps in getting you starte
d.
- Elton

Similar Messages

  • Programmatically fire graph cursor move event

    Is it possible to programmatically fire the Graph Cursor Move Event ?  Assigning a value to the Cursor Index or Cursor Position property node does not seem to do it.
    Solved!
    Go to Solution.

    The graph cursor move event contains processing code for data on the graph along with front panel display of those results.  Data is put onto the graph during data acquisition which occurs in another event.  When that data acquisition event finishes I need to cause the processing code to execute once to update the front panel display so its results are shown for the new acquired data.
    I could put the processing code into a different event that fires on say a button value change.  Then the graph cursor move event would fire that button event change by setting its value change property.  The data acquisition event could also fire that button event.

  • I have a 27" desktop mac running with OSX 10.6.8.  The bluetooth keyboard started not typing when some of the keys are pressed. Plugged in a wired keyboard, started doing the same thing.  Now the cursor moves but cannot select anything.  Suggestions?

    I have a 27" desktop mac running with OSX 10.6.8.  The bluetooth keyboard started not typing when some of the keys are pressed. Plugged in a wired keyboard, started doing the same thing.  When opening up a browser or application, the cursor moves but cannot select anything.  Suggestions?

    Maybe something in these Apple support articles will help.
    Keyboard Doesn’t Work
    Keyboard Keys Do Not Respond
    Keyboard/Mouse – Troubleshooting Wireless

  • Macbook Pro 10.6.8 - Cursor moves by itself, types by itself, opens dashboard by itself, stops responding to keysto22000 there you go! Have switched out keyboards to no avail. Do not use wireless.

    Cursor moves by itself, types by itself, opens dashboard by itself, stops responding to keysto22000 - there be a good example. Seems to like the number 2. Have switched out keyboards to no avail. Do not use wireless. Does not start immediately upon turning on computer. Everything is okay from 10 to 20 minutes, then bang. Can deattach then attach keyboard and get a few moments of quiet. All this started today.

    If the same erratic behavior occurs when the external KB and mouse are completely disconnected, I think it's time for a Genius Bar appointment to have the problem diagnosed.
    http://www.apple.com/retail/geniusbar/
    You'll probably want to get the machine revved up ahead of time so it's misbehaving when you walk in the door, rather than count on it to act up — or not — after you and the Genius have been standing around waiting for a while. (BTW, I'm assuming that once it starts acting up, it continues to do so until you give up and shut it down. Is that true?)

  • Graph xy move cursor programmability

    Hi, i have this problem,
    i have graphXY with one cursor, "Snap to point" "Channel 1", when programmability associate one position(x) for the cursor, no accept the new position. Why?
    Hola a todos, perdón por mi inglés, pero tengo el siguiente problema, Tengo un gráfico de tipo Xy, en el cual tengo un cursor asociado al Plot 1 bajo la modalidad Snap to point, si programáticamente quiero cambiarle el valor X a ese cursor, no solamente no lo hace, sino que vuelve al princicipio de la señal. Cómo puedo evitar esto?. No quiero que funcione el cursor en forma free, porque no me toma los valores del Plot.
    Podrían saber por qué es esto?
    Muchas gracias, saludos, MFS.

    So what is the question about... I have to use XY graph in my program. It is used in Loop while cycle. It shows the statistic of a variable. I am using cursors in this graph to check the actual value of a variable in different period of time. But there are 7 variables and it is extremely hard for user to check each value independently. So I tried to make them moving on the X axis (TIME) together using the property node (cursors reading the position (only X axis, Y axis status lock to plot) of the major cursor and follow it... Everything looks great? But it did not work when I am trying to move the major cursor manually on graph... It works only when I am using the cursor movement buttons... But they work very slowly when there is a lot of data in graph.
    I want to find out is it possible to make seven coursers mouthing together By the X axe and be Locked each at its plot by Y axe manually (Using mouse moving on a graph). Is it possible? If it is than how to do it?

  • Automatic Cursor Movement in one Graph, in accordance to the cursor in another graph

    I am using two XY graphs each with 4 cursors. I want to assign each cursor of graph A to each cursor of graph B such that the corresponding cursors in graph B moves in accordance to the cursors in graph A.
     I have used Active cursor, Cursor.PosX and it works for one cursor. However when I use the same concept to change the active cursor value and faciliate the automatic movement for all cursors they do not work.
    Message Edited by Chathuri on 08-13-2009 06:26 AM
    Solved!
    Go to Solution.

    Hi,
    As requested I would like to post the solution as to how I tacked the problem. It was actually small mistake on my part. When I connect the two property nodes for each XY graphs I should connect ActiveCursor to ActiveCursor and Cursor.PosX to Cursor.PosX. What I did was connect the Active cursor of A graph to the cursor.index of B graph. I have attached a small screen shot of connecting the first cursor of A graph to the 1st cursor of B graph so that the cursor in B graph follows the cursor in A graph.
    In order to connect more cursors as in my case, the only change to be made is the change in the Acitve cursor constant to, 1,2,......
    Chathuri
    Attachments:
    CursorMovement.JPG ‏7 KB

  • Event Precedence - Mouse Move or Cursor Move on Graph?

    Since LabVIEW 8+ introduced cursor events (grab, move, release), is there a conflict that would occur between a mouse move event and cursor move event since a cursor move involves a mouse move?  Or, since the cursor move requires the left mouse button to be down, does that allow LabVIEW to differentiate which event is occurring?  I have some code I am writing to draw a box on an intensity graph (using the new plot.images property for graphs) so as to extract a region of interest.  At first, I want a cursor to follow the mouse as it moves over the graph.  Then, I want to draw the box region when I grab the cursor (with left mouse key down) and drag it.  Differentiation of these two event types will allow me to unambiguously accomplish this task.
    Thanks,
    Don

    Moving a cursor will interleave mouse move and cursor move events.
    However, you can easily keep state of mouse up/down to distinguish what to do in this particular case. See attached draft (8.20).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    eventqueue1.vi ‏29 KB

  • Keyboard issue - Cursor moves backwards while typing

    Hello,
    I have an issue with the keyboard of a Macbook Pro (2011). When I'm typing (email, notes or word etc.), the cursor moves up a couple of lines by itself and I end up typing in a middle of another word. It seems to do so randomly. I have done what apple advises in case of keyboard issue but it hasn't solved the problem so I was wondering if any of you had any suggestion on how to solve that. Thanks

    If you have another keyboard, use it see if the problem crops up there. 
    Reset the SMC:  http://support.apple.com/kb/HT3964 Intel-based Macs: Resetting the System Management Controller (SMC)
    From the disc that originally came w/your comp, run the Hardware Test & post the results.
    Keyboard may be dirty.  Try cleaning it using an air compressor and/or a brush vacuum hose.

  • How do I get an event-based response to a graph cursor change?

    I want to respond to the user moving a cursor on a data (X-Y) graph. (LV 7.0)
    What I really want is an event called "Graph.Cursor.Value Change", which would supply me with the new coordinates, but I see no such event.
    If I use the MOUSE MOVE event to trigger obtaining the cursor values, it does not give me an event, until the cursor has stopped moving, the button is up, and the mouse moves off the cursor line.
    Sure, I could use a TIMEOUT event, and read it every 100 mSec, but I don't like the time lag.
    What I did was to set a flag TRUE on Graph.MouseDown and FALSE on Graph.MouseUp. I then choose an event timeout of 10 mSec or -1, depending on that flag.
    That works, but is there a more direct way that I'm missing?
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    No, unfortunately there is not.
    To code around this limitation, I typically use the timeout event in a more complex way as follows:
    The timeout is wired to a shift register that is initialized with "-1" (no timeout). The value from the shift register then crosses the event structure and feeds to the shift register on the right in almost all event cases.
    I add two special event cases:
    (1) "graph-mouse down" puts a small number (e.g. 10ms) in the right timeout shift register
    (2) "graph-mouse up" puts again a -1 in the right timeout shift register
    (x) All other event cases (incl. timeout) wire the current timeout straight across to the right shift register.
    The timeout event contains the logic to read the graph cursors and associated actions.
    This way there is normally infinite timeout. Once the mouse goes down on the graph, the timeout executes at relatively rapid succession until the mouse is raised again. At which point everything quiets down.
    LabVIEW Champion . Do more with less code and in less time .

  • Cursor moves on it's own on my 24" imac

    My cursor moves on it's own. I do not have a trackpad, or Timbuktu (not sure what that is?) I have used apple support on this once all ready. They had me do a restart from the system disk, run Disk Utility, unplug everything wait and then replug, zap the p-ram, dump a preference panel. But none of it fixed the problem. The cursor just shoots off to the side or the top or bottom depending on what it's closer to. I bought a new mouse, and still had the same problem, so I returned it. I upgraded to the latest OS, still have the problem. The problem continues when I'm working in Photoshop and Illustrator, which is really frustrating because it suddenly streaks across the page while I'm painting (in PS) or if I'm working an anchor point in Illustrator it suddenly pulls it off the page.
    Can anybody help me fix this once and for all?
    I really appreciate any and all suggestions.

    Restart the computer, as long as you're at it do a SMC reset:
    SMC RESET
    • Shut down the computer.
    • Unplug the computer's power cord and all peripherals.
    • Press and hold the power button for 5 seconds.
    • Release the power button.
    • Attach the computers power cable.
    • Press the power button to turn on the computer.
    PRAM RESET
    • Shut down the computer.
    • Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    • Turn on the computer.
    • Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.
    Roger

  • Graph cursor mystery

    I have troubles understanding how to use cursors on a XY graph. I can create a cursor, snap it to a graph and move it around.
    However, as soon as I use another Graph tool (such as zoom, etc), I can't grab the cursor again. The only work around that seems to work is delete the cursor and crete another one.
    Any comments?
    X.

    I see. I think I know what the issue is. Currently, the graph tool palette doesn't do the best job of indicating its current selection, or more to point, it doesn't let you know that you currently have no tool selected. After you select a tool, you must deselect it so that you can interact with items such as cursors. If any tool is currently selected, you can not act on a cursor. The fact that the tool palette doesn't visually indicate that no tool is selected is certainly a bug, but the workaround is to just press the same tool selection again to deselect it.

  • Graph Cursor Question

    I have a cursor on a XY-graph that I'm trying to adjust (x position) via controls on the front panel.  I have one control that works great and adjusts one number at a time (ex. 500 to 501, etc).  I'd like to have two controls one like I have that would be a fine adjustment (I believe) and another for coarse adjustment that would adjust the value by 50 or whatever.  Hence this would be adjusted first (ex 550) and then the other control would be adjusted for fine tuning (ex to say 551 etc). 
    I'm having trouble figuring this out, and was hoping someone could giv eme some tips or ideas as to what to do.  I thought this might be something fairly common, but maybe not.
    Thanks in advance...
    Using Labview 7.0 and 2010 SP1 with Windows XP and 7.

    LabVIEW 8.0 would make these things much easier, because we have events for cursor movements! .
    In LabVIEW 7.0, you need to code around it. For example, you could place the cursor reads into a timeout event which is only active when the mouse is down on the graph (enable timeout with mouse down, disable with mouse up event).
    The attached shows one simple possibility (I don't think you need the course control).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    DualCursorControl3.vi ‏64 KB

  • Moving xy graph cursor with mouse and programmab​ly controllin​g snap to point

    Hi,
    I have run into a bit of a problem. I am trying to create a program which allows a user to select a location on an XY graph by simply clicking in the vacinity of the plot. Most of it is working, however I find that I can't programmably control the snap to point function reliably.
    I hope this is a clear outline of the problem:
    - The cursor starts in a Free state, so that when the
    user clicks in the plot area, I can set the cursor
    position to the nearest point by setting the
    CursorPosition using the graph's property node.
    - Maybe the user didn't like the chosen location and
    wants to drag the cursor over a bit. Ok, user drags
    the cursor to a new position.
    - Now th
    e cursor position is probably not exactly on
    the plot trace. If, at this point, I set the cursor
    to Snap To Point, the cursor does not snap to the
    nearest point on the graph (relative to its current
    position), but instead to the last place a _mouse_
    action placed it.
    - Immediately after the new location has been set,
    the cursor state has to be reset to free in case I
    need to programmably move the cursor again (I
    can't seem to programmably control the mouse in
    any state but Free)
    How do I go about getting the cursor to snap to the closest point at it's new location? I'm at a loss.
    Any insight you might have would be greatly appreciated.
    Thanks much!
    Tere

    So what is the question about... I have to use XY graph in my program. It is used in Loop while cycle. It shows the statistic of a variable. I am using cursors in this graph to check the actual value of a variable in different period of time. But there are 7 variables and it is extremely hard for user to check each value independently. So I tried to make them moving on the X axis (TIME) together using the property node (cursors reading the position (only X axis, Y axis status lock to plot) of the major cursor and follow it... Everything looks great? But it did not work when I am trying to move the major cursor manually on graph... It works only when I am using the cursor movement buttons... But they work very slowly when there is a lot of data in graph.
    I want to find out is it possible to make seven coursers mouthing together By the X axe and be Locked each at its plot by Y axe manually (Using mouse moving on a graph). Is it possible? If it is than how to do it?

  • XY Graph Cursor

    I have one xygraph with six plots(six signals). I want associate one cursor on the six plots. I want move cursor in the graph and display the different values in the different plots. How this?.
    Tengo un gráfico con seis plots y quiero asociar un cursor a los seis. Donde al moverlo por el gráfico me muestre en seis controles enteros los valores Y de los plots.
    Muchas Gracias a todos, MFS.

    So what is the question about... I have to use XY graph in my program. It is used in Loop while cycle. It shows the statistic of a variable. I am using cursors in this graph to check the actual value of a variable in different period of time. But there are 7 variables and it is extremely hard for user to check each value independently. So I tried to make them moving on the X axis (TIME) together using the property node (cursors reading the position (only X axis, Y axis status lock to plot) of the major cursor and follow it... Everything looks great? But it did not work when I am trying to move the major cursor manually on graph... It works only when I am using the cursor movement buttons... But they work very slowly when there is a lot of data in graph.
    I want to find out is it possible to make seven coursers mouthing together By the X axe and be Locked each at its plot by Y axe manually (Using mouse moving on a graph). Is it possible? If it is than how to do it?

  • XY Graph cursor Error

    Hello
    This error was found, when I started using LabView 8, with my old LabView 6.1 VI's.
    I have encountered a minor error on my Graph display. I noticed my Y-Scale numbers go negative, if I Press and Hold my Graph cursor, while I am moving it.
    I run this same test using New LV 8 XY Graph and numbers do not go negative, but they surely flicker a lot + numbers still change some.
    Have you noticed this before? Is there some new property I need to set up, to make my LabView 6.1 Graph stable? Is this known bug or am I just doing something wrong?
    Here is VI for your testing. My LabView 8 version is 8.0.0.4005.
    Just run it and while moving yellow cursor (press+hold+move), after 1-2 seconds of holding something happens.
    Yours
                                         Kari
    Attachments:
    Cursor Test.vi ‏84 KB

    Hello Karik.
    I experience the exact same problem in the application I'm programming.
    The only solution I have come up with is having the cursors Y-axis
    centered in the visible area of the graph.
    However this is really bad because there is will create a smal "hole"
    in the cursor bar, it looks awfull. I think this is a bug in lv8 since
    in lv7.1 I could tie down the y-axis to like -10000 or something and
    the problem would not appear.
    Hope NI fixes this problem really really soon.
    //Andreas

Maybe you are looking for

  • Aperture 2 won't launch

    For some reason, Aperture 2 will not launch. It was working fine after doing an archive install of OSX 10.5 for another problem. The only think I did after that and prior to the problem was upgrade to iTunes 10, install a security update, and repair

  • Having trouble updating my ipad

    having trouble updating my ipad comes up with an error msg 3259 and a network timed out msg. im using windows vista and i have followed the instructions on the apple site about turning of all my firewalls but still having no luck with updating to 4.2

  • 10.5.6 Novell iChain

    In addition to HSBC and other banks, since updating to 10.5.6 Novell iChain will not work with Safari. My work uses iChain and I can't access anything that sits behind it. Temporarily I've installed Firefox, but even that seems to be chugging along a

  • Having trouble accessing wikis & blogs via VPN

    After I connect to our server via VPN when I'm outside of our network, I'm having trouble getting wiki and blog pages to open up. Currently I'm using the internal hostname to pull up the pages: ajax.private (we used the .private domain because it is

  • 5.2 CC SP9 Rule Export Problem

    We just recently applied Support Pack 9 to CC.  When in CC ->  Rule Architect ->  Rules ->  Action Rules I perform a search for Action Rules and perform an Export of the data found, save it to the desktop or try to open, but Windows won't let me extr