Custom Control Help: Draw a line and output start and end points

I'm looking to find or make a custom control (or simple subVI) that will appear as a 100x100 unit grid and allow me to draw a line from one point to another on that grid. It will then output the (x,y) of the starting and end point of that line on the grid.  Any help or ideas?
Thanks,
Steve
LabVIEW 2009 SP1
Solved!
Go to Solution.

What you basically want is a loop with an event structure where you process Mouse Down, Move and Up events for your controls. There are any number of ways of implementing something like this, but this one will probably be the simplest:
Use a multicolumn listbox or a table for your grid. Hide the scrollbars and headers.
You can use the ActiveCell property with -2,-2 to select all cells. You can then use the cell size property to set the exact size of the cell.
Next, you put a picture control on top of the table and color its background transparent so that the table shows through. You use property node to make sure the two are aligned to exactly the same spot and size.
You use the mouse events on the picture control to detect the clicks and moves.
You use the table's Point to Row Column method to translate the event's position data to a cell.
You use the picture control VIs to draw the line on the picture based on that data.
You can even color the selected cells in the table using the table properties.
If you want to simplify things somewhat, you can also use the timeout event instead of the Mouse Move event to draw the line, but then you'll need to keep the timeout value in a shift register and reset it to -1 (no timeout) when the Mouse Up event happens.
I would also suggest processing Mouse Enter and Leave events to change the cursor and cancel if the user leaves in the middle of dragging.
Try to take over the world!

Similar Messages

  • Uploading newer ios on Ipad 2 - things were going well then got a picture of the apple logo and a line moving from start to end - stopped short of end and can't do anything now - HELP

    Uploading newer ios on Ipad 2 - things were going well then got a picture of the apple logo and a line moving from start to end - stopped short of end and can't do anything now - HELP

    Try a soft-reset and see if that gets it to boot up properly : press and hold both the sleep and home buttons for about 10 to 15 seconds, after which the Apple logo should reappear and it will hopefully boot up.
    If it doesn't then try recovery mode and restore/resync your content : If you can't update or restore your iPhone, iPad, or iPod touch

  • I try to make update for my iphone and start showing itunes need to be connected and never start and i connect my phone on itunes but it say need to be format for phone .please help me .

    I try to make update for my iphone and start showing itunes need to be connected and never start and i connect my phone on itunes but it say need to be format for phone .please help me .

    Hello Huss87bash,
    This screen indicates that the device is in recovery mode, and must be restored in iTunes before it can be used again.
    If you can't update or restore your iOS device
    http://support.apple.com/kb/HT1808
    Once the device has been restored, you should be able to restore your device from a backup to replace all of your content and settings.
    iOS: Back up and restore your iOS device with iCloud or iTunes
    http://support.apple.com/kb/HT1766
    Cheers,
    Allen

  • Help drawing curved line - please!!!

    Seriously, I can't find a tool to draw a curved line in PSE 6!  I was told to use the "pen tool" but I can't find it.  I was told to make the selection right clicming on Pencil and has no options other than for a freehand drawing with the mouse.  The "shapes" tool will only give me a straight line.  What the heck am I missing?
    Thanks!

    The pen tool is only in Photoshop, not elements. You can draw freehand with the brush or pencil tools (you can  put something on a separate layer below and trace the edge if you need help), or you can draw a selection with the elliptical marquee tool, go to Edit>Stroke (outline) selection to color it, then erase the parts you don't want.
    The custom shape tool draws many shapes. It sounds like you have the line tool selected. Hold down its icon in the toolbox and you'll see several other tools in there. The polygon tool with the rounded corners option turned on will draw circles, although it's not supposed to.

  • How to draw a line of sin x and its area under the line?

    Hi,
    I know how to draw a line from two points. However, I do not know how to draw a line of function sin(x) and its area under the line. Anyone know where to read or how can I draw it, please help me. Thanks !!
    Calvin

    use Graphics2D:: draw(Shape)
    create a class that implements Shape, and specifically the getPathIterator methods, in these methods you should return a path iterator that follows the sin/cos curve.
    All fairly simple to do.
    rob,

  • Difference between IN and OUT and Media Start and Media END??  NEED HELP!!!

    As the titles states, what is the difference?
    I edited my film in preview/jpeg mode and now need to online the project to full quality. So far it hasn't gone to well. For example the media starts at 00:09:45:12. When I do a batch capture I watch the camera fly right by the time code that it should start capturing at. What am I doing wrong???
    Some files onlined easy, but there is a set from one tape that just won't sync up or capture.
    It also keeps telling me that I have time code breaks from time to time, but when I play the tapes back they look fine to me. No obvious breaks in time code from start to end.
    thanks for any help or advice

    Recapturing can be really tricky. Takes practice and it's never recommended that you try it out on a critical piece. Timecode breaks can be perceived by FCP as being caused by several things besides actual breaks in the flow of code. The most common is probably tape dropout.
    The clips that are giving you trouble, try parking the tape very close to one of the start points and recapture only that one clip.
    If your in point is too close to a timecode glitch, you will never be able to recapture it. You'll need to capture it using NOW and then recut the clip into the scene.
    bogiesan

  • Help reqd..Not able to Starting and Testing a Message Broker

    I am new to Sun Java System Message Queue. I have downloaded a trial version of Message Queue 3 2005Q4 (3.6 SP3) Platform Edition from Sun website. I have installed this on RedHat 4.0, Itanium 64 bit server, jrockit-jdk1.5.0_06 j2se. I am referring to Sun Java� System Message Queue 3 Developer�s Guide for Java Clients document, as per this I have setup Message Queue Directory Variables. After environment variables setup, trying to Starting and Testing a Message Broker. Once Run the broker startup command
    "imqbrokerd -tty"
    Getting following errors in terminal:
    Exception in thread "Reference Handler" java.lang.StackOverflowError
    at java.lang.Class.forName(Ljava.lang.String;ZLjava.lang.ClassLoader;)Ljava.lang.Class;(Unknown Source)
    at java.lang.Class.forName(Ljava.lang.String;J)Ljava.lang.Class;(Unknown Source)
    at java.lang.ref.Reference$ReferenceHandler.run()V(Unknown Source)
    Exception in thread "Finalizer" java.lang.StackOverflowError
    at java.lang.Thread.run()V(Unknown Source)
    [23/Feb/2007:06:43:16 PST]
    ================================================================================Sun Java(tm) System Message Queue 3 2005Q4
    Sun Microsystems, Inc.
    Version: 3.6 SP3 (Build 02-A)
    Compile: Wed Jun 22 15:30:03 PDT 2005
    Copyright �� 2005 Sun Microsystems, Inc. All rights reserved.
    Use is subject to license terms.
    This product includes code licensed from RSA Data Security.
    ================================================================================Java Runtime: 1.5.0_06 BEA Systems, Inc. /PES-Software/jrockit-jdk1.5.0_06/jre
    Exception in thread "JMQTimerThread" java.lang.StackOverflowError
    at com.sun.messaging.jmq.util.timer.TimerThread.run(JMQTimer.java:410)
    [23/Feb/2007:06:43:16 PST] License: Sun Java(tm) System Message Queue 3.6 Platform Edition
    [23/Feb/2007:06:43:16 PST] IMQ_HOME=/opt/sun/mq
    [23/Feb/2007:06:43:16 PST] IMQ_VARHOME=/var/opt/sun/mq
    [23/Feb/2007:06:43:16 PST] Linux 2.6.9-42.EL ia64 rhel4 (8 cpu) root
    [23/Feb/2007:06:43:16 PST] Java Heap Size: max=196608k, current=32768k
    [23/Feb/2007:06:43:16 PST] Arguments: -tty
    [23/Feb/2007:06:43:16 PST] [B1004]: Starting the portmapper service using tcp [ 7676, 50, * ] with min threads 1 and max threads of 1
    java.lang.StackOverflowError
    at java.lang.Thread.run()V(Unknown Source)
    [23/Feb/2007:06:43:16 PST] WARNING [B3100]: Unexpected Broker Internal Error : [Uncaught Exception in thread Thread[JMQPortMapper,5,default]] :
    java.lang.StackOverflowError
    at java.lang.Thread.run()V(Unknown Source)
    [23/Feb/2007:06:43:16 PST] [B1060]: Loading persistent data...
    [23/Feb/2007:06:43:16 PST] Using built-in file-based persistent store: /var/opt/sun/mq/instances/imqbroker/
    [23/Feb/2007:06:43:17 PST] [B1136]: Processing stored transactions
    [23/Feb/2007:06:43:17 PST] [B1013]: Auto Creation of Queues is Enabled
    [23/Feb/2007:06:43:17 PST] [B1151]: Loading destination mq.sys.dmq [Queue] with 0 messages
    [23/Feb/2007:06:43:17 PST] [B1152]: Loading of destination mq.sys.dmq [Queue] complete
    [23/Feb/2007:06:43:17 PST] [B1004]: Starting the admin service using tcp(host = *, port=0, mode=dedicated) with min threads 4 and max threads of 10
    java.lang.StackOverflowError
    at java.lang.Thread.run()V(Unknown Source)
    [23/Feb/2007:06:43:17 PST] WARNING [B3100]: Unexpected Broker Internal Error : [Uncaught Exception in thread Thread[admin_ACCEPT,5,default]] :
    java.lang.StackOverflowError
    at java.lang.Thread.run()V(Unknown Source)
    [23/Feb/2007:06:43:17 PST] [B1004]: Starting the jms service using tcp(host = *, port=0, mode=dedicated) with min threads 10 and max threads of 1000
    java.lang.StackOverflowError
    at java.lang.Thread.run()V(Unknown Source)
    [23/Feb/2007:06:43:17 PST] WARNING [B3100]: Unexpected Broker Internal Error : [Uncaught Exception in thread Thread[jms_ACCEPT,5,default]] :
    java.lang.StackOverflowError
    at java.lang.Thread.run()V(Unknown Source)
    [23/Feb/2007:06:43:17 PST] [B1039]: Broker "imqbroker@rhel4:7676" ready.
    Exception in thread "Thread-1" java.lang.StackOverflowError
    at com.sun.messaging.jmq.util.log.Logger.format(Logger.java:580)
    at com.sun.messaging.jmq.util.log.Logger.logToAll(Logger.java:994)
    at com.sun.messaging.jmq.jmsserver.brokerShutdownHook.run(Broker.java:1878)
    Please suggest me how to resolve this issue..
    Thanks,
    Sajjan

    How do you run the program?
    I need to copy the compiled BasicPlugin.api under Acrobat\plug_ins folder. I can create a subfolder of plug_ins and copy the .api file there. Just one level deep: if I create a subfolder under a subfolder of plug_ins, the .api file will not be found by Acrobat.
    Then I need to restart Acrobat and I find the plugin running. In particular, BasicPlugin add a new Acrobat SDK menu and a menu item under it.
    If I close Acrobat and go back to Visual Studio, I can push the Debug button which will open Acrobat for me and stop the program execution at any breakpoints I have set in the code.

  • I plugged my ipod touch into my laptop and started to down load an (1) upgrade.  But Itunes says that the upgrade will take two hours.  I started the down load and it started and stoped and eventualy never complerted the down load.  How can I fix this ?

    I plugged my Ipod touch into my Dell laptop and went to Itunes.  Itunes told me I should down load an upgrade, so I did.  Itunes said the down load would take two hours.  I started the down load, but after two + hours (&longer) , after several starts and stops the down load never completed. 
    I recently got a (fake anti virus) virus and it damaged my computer.  I got it fixed and reinstalled the software and it appears to be working correctly. Could this be the part of the problem ?
    Would it help if I reloaded the Itunes (off an external HD) or downloaded it again from Itunes ?
    Thanks

    I doubt it.  For my updates, it has typically taken me many tries/retries.  Like for you, the download would stop.  and I would have to restart from the beginning.  If you get a network timed out error try disabling the security software on your computer.

  • Schedule type LineChart with clients and unavailable start and end dates

    I have been working on trying to get something in flex which will display a list of clients and their unavailability start and end dates.   I have attempted the line chart and the HLOC chart but have not seen success.  I do have the H or V grids working fine.  But getting the data to display in a line graph based upon start date and end date has been my challenge.  any suggestions
    Current Code:
        <s:Label x="0" y="5" text="Min Date" height="24" fontFamily="Times New Roman" verticalAlign="middle"/>
        <mx:DateField id="minDateField"
                      x="50" y="5"
                      formatString="MM-DD-YYYY"
                      selectedDate="{minDate}"
                      change="minDatefield_changeHandler(event)"/>
        <s:Label x="150"  y="5" text="Max Date" height="24" fontFamily="Times New Roman" verticalAlign="middle"/>
        <mx:DateField id="maxDateField"
                      x="200" y="5"
                      formatString="MM-DD-YYYY"
                      selectedDate="{maxDate}"
                      change="maxDatefield_changeHandler(event)"/>
        <mx:LineChart id="nonAvailsLC" x="0" y="40"
                      showDataTips="true"
                      dataProvider="{getNonAvailsResult.lastResult}"
                      creationComplete="nonAvailsLC_creationCompleteHandler(event)"
                      width="890" height="550">
            <mx:backgroundElements>
                <mx:GridLines gridDirection="both"/>
            </mx:backgroundElements>
            <mx:horizontalAxis>
                <mx:DateTimeAxis dataUnits="days" minimum="{minDate}" maximum="{maxDate}"
                                 labelUnits="days"/>
            </mx:horizontalAxis>       
            <mx:verticalAxis>
                <mx:CategoryAxis categoryField="user" labelFunction="getName"/>
            </mx:verticalAxis>       
            <mx:series>
                <mx:LineSeries xField="startDate" yField="user"
                               form="horizontal"/>
            </mx:series>
        </mx:LineChart>

    I guess I still have lots to learn about Flex and Renderers. I downloaded a Gantt chart with Code and they used the AdvancedDataGrid with renderers and such.  I modified the code to work for me. but if I had to create it myself right now, I would be in trouble.  Lots more to learn.

  • Help - drawing curved lines

    Hey everyone
    This is probably going to have an easy solution but I really cant figure it out!! The problem is drawing a loop in a state machine, ie a path to and from the same node therefore a loop!
    Is there a way to actually do this?
    Thanks in advance!

    try using the GeneralPath class and using a series of curveTo or quadTo calls. Keep nodes colinear to preserve derivative continuity, and you should be able to make the curved shape you want.

  • Help please! Imac won't start and running out of ideas

    Help! My imac G4 Flat Panel running tiger won't boot or go beyond the grey screen, here's what happened,
    I went away on holiday for ten days and unplugged it, on return it worked fine for the first few goes however after leaving it with alot of photos open for a couple of hours I returned and the screen had gone funny, showed the app window on top but not properly and grey on the bottom two thirds, I could just about move the mouse which was ghosting and it sort of worked but not properly, I switched it off on the power switch and rebooted and it was okay for a few more sessions until getting stuck with the mail app open, I tried to force quit but couldn't and eventually turned it off on the switch, after which it won't boot or go beyond the grey screen every time I switch it on, I've tried all the following with no joy:
    -unplugged all peripherals
    -taken out airport card and extra ram I'd fitted myself about six months ago
    - done command, option, p and r on switching on, also command x and command option.
    - tried to boot from the original os x cd which came with it - this gives me a broken mac symbol and multicoloured spinning ball
    - boot from os9 disk which came with it this gives me a flashing question mark sometimes but most times just the grey screen.
    - boot from apple hardware test diagnostic cd which came with it, just says loading and hangs
    - boot from tiger dvd - shows the apple logo then a sign similar to no entry sign and spinning thing underneath.
    I've tried rebooting about 100 times now, as it once did a similar thing about eight months ago but eventually booted okay and then I ran check permissions etc. and never had a problem until now.
    I've put everything I can think of in in case any of it is important, apologies if there's too much extra info here but if anyone has any ideas I'd be very grateful, am a bit stuck without it, luckily I've backed up most of my stuff but there's some things I haven't. please help! thanks

    Sorry to hear about your problem and I wish I had happy news. Sounds like what I am going through. Just spent over 200$ getting the Tiger upgrade installed at a Mac repair place because I wanted it done right, and had the RAM upgraded. After two weeks of bliss I get a gray screen with a spinning gear. The CD drawer wont open, nothing. Take it back to the shop and I find my hard drive is done. This is the SECOND hard drive. My G-4 came with a 40 gig HD, the one that they replaced it with 2 years ago was an 80 gig. I hope thats not whats going on with yours but it sure sounds like it. I beginning to wonder if there isn't a design issue going on here. I am a casual computer user but my son is on it for hours at a time and I'm wondering about heat buildup and the hard drive. Gonna ask that question when I pick it up, good luck with yours.
    Pat

  • Combining and outputting SD and HD in same timeline

    I have a bunch of stuff shot in SD and just purchased the Sony FX7 and want to finish off a project with some of the stuff i shot in HD with that camera. I have no problem working with both formats in the timeline, but when i burn it onto DVD there is noticeable issues with the stuff shot on the HD camera. Seems like its an interlacing problem. I do'nt know if there is something in compression that can help it or what i can do. I'm new to FCP 6. Any help would be greatly appreciated!!!

    Capture the HDV footage as DV, so that it matches the DV footage you already have shot. There is an option in the camera to downconvert as the signal is being sent out.
    Shane

  • My 5c is blue screen and re starting and when the recharge restating ios 7.0.5

    My phone is 5c
    Operatin system ios7.0.5
    Blue screen and restating and when the recharge it restating outomaticaly

    This is not the support group to help with your problem.
    At the top of this page look for Apple Support Communities, click it and scroll down to look for iPhone groups

  • My BB's screen goes blank and re-starts and my battery drains

    Hi Everyone!
    I really need help. About 4 days ago my BB 8310 started acting very weird.  First it started to consume battery like crazy and then everytime I played BrickBreaker it went blank.  When it re-started it said Uncaught Exception: Java Lang Error.  I have UberTwitter v.0.912 and hadn't had any problem until 4 days ago.  Yesterday, I downloaded DeskTop Manager v. 5.0 (mine was v. 4.5), deleted BrickBreaker and re-installed it, deleted UberTwitter and re-installed it but I still get the same error and battery drain.  I updated my OS to v. 5.4 about 9 months ago and the device was working beautifully.  About a month ago I downloaded Application World, but deleted it because it slowed my device a bit.
    Questions:
    1.  Do I have some kind of corrupted file?
    2.  If so, what do I need to do?  I read here that maybe I would have to do a wipe, how do I do it?
    3.  Could it be some kind of worm or virus?  I say this because I live in Venezuela and the device started acting wierd during a political demonstration that I was attending, could my BB been attacked?
    I depend on my BB for EVERYTHING and feel at a loss, please help me.
    Thank you in advance,
    Jazzdancer
    Solved!
    Go to Solution.

    I have never been likened to God lol! I am just an average user like yourself doing my best to help out and learning from these forums as well
    Concerning the battery drain:
    1. Make sure you don't have apps running in the background that are constantly sending and receiving data unnecessarily
    2. Turn off your bluetooth when you don't use it for long periods of time
    3. If you are in a low signal area (two bars or less) it tends to drain the battery significantly
    4. "reset" the battery gage by draining the phone to 15% and then fully recharging. This needs to be done periodically just to make sure the gage is correct
    5. Use the holster to put the phone in standby (conserves battery power) or manually put the phone in standby by pressing and holding the mute button. There is also an app called Autostandby that can automatically do that for you after x amount of time of inactivity
    6. Turn down the brightness of the screen and decrease the time before it turns off.
    In general the more data service use and talking you do with the phone reduces how long the battery will last. The battery performance does degrade with time but I don't know how long it is normally expected to last.
    Be sure to charge  the battery whenever possible and never let it drain competely. These battery packs don't require conditioning like other batteries and it is bettery to charge them whenever possible.
    If you still have problems, then consider purchasing another battery.
    Hope this helps and let us know how it works out for you
    Kijana
    Please remember to:
    1. Mark Accept as Solution on the appropriate post once your issue has been resolved
    2. Give Kudos to helpful posts (click the star next to the post)
    Thanks

  • My tool bar isn't showing at top and the start and time at bottom isn't showing up...

    What has happened and how do I fix this?

    * If on Windows in Firefox 3.6 the menu bar is hidden then press and hold the Alt key down, that should make the "Menu Bar" appear.
    * Go to "View > Toolbars" and put a check-mark for "Menu Bar" to make that permanent. See [[Menu bar is missing]]).
    * Make sure that you have the ''Navigation Toolbar'' and other toolbars visible: "View > Toolbars"
    * If items are missing then see if you can find them in the "View > Toolbars > Customize" window.
    * If you see the item in the Customize window then drag it back from the Customize window to the Navigation toolbar.
    * If you do not see that item then click the "Restore Default Set" button in the "View > Toolbars > Customize" window.

Maybe you are looking for