Straight line with user interaction

Hi,
  I want to create graphics area within a panel.  Within the panel I want to have a straight vertical line(From top to bottom) within the box.  Then upon the user selecting an area within the graphics area I would like the vertical line to move to that location.  Is this possible?
I originally wanted to use a chart to do this but there doesnt seem to be any way of doing this!
Please help,
  Paul.

Here is a Flex 3.x sample...
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="ccomp();" layout="absolute" minWidth="1024" minHeight="768">
    <mx:Script>
        <![CDATA[
        import mx.core.UIComponent;
        private var overlay:UIComponent = new UIComponent();
        private var pt:Point = null;
        private function ccomp():void
            canvas.addChild( overlay );
        private function handleMouseDown( event:MouseEvent ):void
            pt = new Point( event.localX, event.localY );
            invalidateDisplayList();
        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
            super.updateDisplayList( unscaledWidth, unscaledHeight );
            overlay.graphics.clear();
            if ( pt != null )
                overlay.graphics.lineStyle( 2.0, 0xFF0000, 0.65 );
                overlay.graphics.moveTo( pt.x, 0 );
                overlay.graphics.lineTo( pt.x, canvas.height );
                overlay.graphics.moveTo( 0, pt.y );
                overlay.graphics.lineTo( canvas.width, pt.y );
        ]]>
    </mx:Script>
    <mx:Canvas id="canvas" mouseDown="handleMouseDown(event);" width="400" height="150" horizontalCenter="0" verticalCenter="0" backgroundColor="#FFFFFF" />
    <mx:Label text="( click in the white area )" horizontalCenter="0" verticalCenter="91"/>
</mx:Application>

Similar Messages

  • Straight lines with gaps without joining

    Hi Everyone,
    I have a requirement.
    Month Qtr Year Avg
    Jan 10 200
    Feb 10 200
    Mar 10 200
    Apr 10 300
    May 10 300
    June 10 300
    July 10 250.
    I need to show the qtr year average in a line but the line shouldn't join the value from 200 to 300 and 300 to 250. Can i Have straight lines with gaps?
    Thank you.

    Also, using Plus,diamond etc would solve the problem but I want '-' symbol type. Is it possible to customize '-' symbol?

  • How can i draw a straight line with a brush?

    i know the pencil tool can draw a straight line with anchor points. is there a setting for the pencil tool that can mimic a 30 point brush, low hardness (faded side to side) at about an 80 degree angle or is there a way to make a straight line with the brush tool using a mouse?
    i know this image is a bit blurry. what i want to do is replace the 2 white angled lines with the 30 point brush effect 230 pixels wide. the project on the left of the pic is a 2ft by 4ft canvas. any ideas? please help.

    Hello Mike, I wonder if you can help, no one else can. I asked this question on the forum in August Brush line fades on start with anchor points
    Only on Photoshop CC does this happen, drawing a diagonal line with shift key, instead of line starting dark & then fading out, it does the reverse, starts on nothing & then darkens towards anchor point. I am on trial versions & can't purchase until this is cleared up.

  • Intersection of straight line with 3rd order polynomial

    Fishing for some advice on finding a solution to finding the intersections of a straight line with a third order polynomial. Does anyone have experience with a problem like this?

    So you want
    1st order polynomial (straight line) in x = 3rd order polynomial in x
    so you need so find the roots of
    (3rd order polynomial in x) - (1st order polynomial (straight line) in x) = 0
    which is
    another 3rd order polynomial in x = 0;
    Google for root finding of 3rd order polynomials.

  • Why does my Wacom tablet only make straight lines with the pencil & brush tool even WITHOUT shift?

    I have Photoshop CS3 on Mac OSX 10.5.8 on a white MacBook and I'm using a Wacom CTE-630, and I always had the correct drivers.
    Yesterday I discovered that the brush and pencil tools were incapable of doing anything but a dot or a straight line while I used my Wacom tablet. Using those tools with the touchpad works perfectly! Curves and squiggles abound! But for some reason I can't do it with my tablet.
    And I yes I tried downloading the latest drivers from the Wacom website... to no avail.
    After looking through forums I discovered that it was a problem experienced by users of tablets of other brands, I couldn't find any mention of Wacom tablets having this issue. And then I saw a thread somewhere that mentioned holding shift created straight lines! So I immediately thought that perhaps photoshop was functioning in reverse or maybe my shift button was broken...
    So I pressed shift, and something different happened, if I made a dot on the page a line would automatically appear, connecting that dot to the previous dot I had made. Which is in contrast to the issue I had been having which goes something like this:
    If I try to make any curved lines, a dot will appear where I first made contact on the page and then when I release the pen from the tablet a straight line will go from there to the dot at the start of the line. In other words, a dot appears when I start a line and no matter what I do with the line after that, a straight line goes from where I ended the line to where I started it!! ARGHHHH!!
    And it turns out It's not a Wacom problem, or it doesn't seem to be, because it works fine with the brush tool in Illustrator CS3.
    So I came to the conclusion it was Photoshop that was at fault. I found nothing on these forums related to my issue.
    I hope someone can help. Because I was really itching to start digitally painting again. =(
    Thanks in advance!!

    Yes I did solve the problem!
    Thanks to everyone that suggested things, but none of them worked. In the end it was Wacom, yes... WACOM that solved the problem. Even though it was an Adobe Photoshop issue as far as I could tell. So thank you Wacom, you helped me when I needed it most.
    So now to the vital solution:
    "Thank you for your recent enquiry regarding pen tool in Adobe Photoshop CS3.
    Please try the step below for reset CS3
    For MAC, please hold pressing command + alt+ shift, then open Photoshop.
    Get the CS3 update. Start CS3 while holding.
    If the problem remains, uninstall and reinstall Adobe Photoshop CS3 again."
    Worked the first time for me. So spread the word! This issue shall trouble people no more, a solution has been found!

  • Problem with creating a straight line with polygamo lasso

    I am having a problem with polygamo lasso. when i create a triangle or a rechtangle in straight line it is turn out the line become not straight. I don't what did i wrong, was always working fine till today. YOu can see the pic the top line lookslike a step.

    Ihope I did right, was not sure how to save as channel.

  • Newbe - straight line with different curves at each end

    I'm generally not using Illustrator as I'm sure you can tell. I need several curly brackets, but none will really do as they will cover varioius lengths and should be the same size. It looks like the easiest way will simply be to create one putting two straight lines together, but I cannot even determine how to get a curved end at one end of the line - yet alone a second different curve on the other end. Thanks. Rick

    shiesl,
    For the curly bracket shape you may consider quarter circles at the ends, and a pair at the middle, all with the same radius.
    You may:
    1) Create a circle with the Ellipse Tool and cut it into quarters at the Anchor Points; you may then use all the bits or just one or two of them with copies,
    2) Place the first quarter with the inner end where you want the first straight part to start (on one side of the intended straight part),
    3) Place the second quarter (corresponding to a 180 degrees rotation) oppositely (on the other side of the intended straight part) where you want the firrst straight part to end,
    4) With the Direct Selection Tool select both inner ends and Object>Path>Join, now you have one half curly bracket,
    5) Object>Transform>Reflect, Align the two halves, and Join them at the midlle.
    For different lengths, you may Direct Select the two Anchor Points at either end and move them away from the middle (you may use arrow, Object>Transform>Move, or other ways).
    If you just want roundings at the ends, you may simplify the suggestion here, just having the second one on the same side in 3) and finish with 4).

  • Automated cropping and resizing with user interaction

    Dear all,
    after hours of tests with batch processing and search in the internet maybe somebody of you can help me:
    I have roughly 3000 jpgs. in one folder (all different sizes and proportions), and I need all of them cropped to a specific proportion (width:height = 4:3) and then resized to a specific size (e.g. 800 x 600px). Batch processing can do a lot, but one critical step is not possible: As soon as one picture has been loaded into PS, I need a user interaction to determine the crop area freely (size and position) before the rest of the process (cropping, resizing and saving) can run automatically again.
    For example a picture of 2000 x 1000 px: The"crop window" lets me to choose an arbitrary area concering size and position (i.e.at 20px from the left, and 10 px from the top, size 1000 x 750 px = fixed aspect ratio  - and different for each picture), then the cropped area is resized to 800 x 600px, then it is saved.(Similar to the marquee tool with fixed aspect ratio)
    The crucial act is the interaction with the "proportional cropping". If the resizing is not possible in the first step, I coudl also do this with a second batch run myself.
    If somebody can help me, I would be very glad....
    Thanks a lot,
    Elmar Hartje

    This should give you the user resize then resize to 800x600.
    var doc=activeDocument;
    if(doc.width>doc.height){
    cropFourThreeRatio(true);
    doc.resizeImage(new UnitValue(800,'px'), undefined, undefined, ResampleMethod.BICUBIC);
    }else{
    cropFourThreeRatio(false);
    doc.resizeImage(undefined, new UnitValue(800,'px'), undefined, ResampleMethod.BICUBIC);
    function cropFourThreeRatio(landscape) {
    var startRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.INCHES;
        var desc1 = new ActionDescriptor();
            var desc2 = new ActionDescriptor();
            desc2.putUnitDouble( charIDToTypeID('Top '), charIDToTypeID('#Rlt'), 0.000000 );
            desc2.putUnitDouble( charIDToTypeID('Left'), charIDToTypeID('#Rlt'), 0.000000 );
      if(landscape){
            desc2.putUnitDouble( charIDToTypeID('Btom'), charIDToTypeID('#Rlt'), 147.000000 );
            desc2.putUnitDouble( charIDToTypeID('Rght'), charIDToTypeID('#Rlt'), 195.750000 );
      }else{
       desc2.putUnitDouble( charIDToTypeID('Btom'), charIDToTypeID('#Rlt'), 127.500000 );
       desc2.putUnitDouble( charIDToTypeID('Rght'), charIDToTypeID('#Rlt'), 96.000000 );
        desc1.putObject( charIDToTypeID('T   '), charIDToTypeID('Rctn'), desc2 );
        desc1.putUnitDouble( charIDToTypeID('Angl'), charIDToTypeID('#Ang'), 0.000000 );
    if(landscape){
        desc1.putUnitDouble( charIDToTypeID('Wdth'), charIDToTypeID('#Rlt'), 288.000000 );
        desc1.putUnitDouble( charIDToTypeID('Hght'), charIDToTypeID('#Rlt'), 216.000000 );
    }else{
      desc1.putUnitDouble( charIDToTypeID('Wdth'), charIDToTypeID('#Rlt'), 216.000000 );
        desc1.putUnitDouble( charIDToTypeID('Hght'), charIDToTypeID('#Rlt'), 288.000000 );
        desc1.putUnitDouble( charIDToTypeID('Rslt'), charIDToTypeID('#Rsl'), 0.000000 );
    try{
        executeAction( charIDToTypeID('Crop'), desc1, DialogModes.ALL );
    }catch(e){app.preferences.rulerUnits = startRulerUnits;}
    app.preferences.rulerUnits = startRulerUnits;

  • How to run report on command line with user parameter?

    Hi,
    How do I run oracle report on command line (batch) with pre-set User Parameter values ? e.g. :P_1 ='SYSDATE' , :P_2 = 'DEPT_NO'
    Thanks

    Hello,
    If you are using rwrun :
    rwrun report=myreport destype=file desname=c:\temp\myreport.pdf desformat=pdf P_1='SYSDATE' P_2='DEPT_NO' userid=scott/tiger@dbalias
    If you are using rwclient , just add server=<reports server name> :
    rwclient server=myrepsevrername report=+myreport+ destype=file desname=c:\temp\myreport.pdf desformat=pdf P_1='SYSDATE' P_2='DEPT_NO' userid=scott/tiger@dbalias
    Regards

  • Can a Lightroom adjustment brush draw a straight line by clicking the start and stop points?

    Can a Lightroom adjustment brush draw a straight line by clicking the start and stop points?

    studioMac wrote:
    I'm trying to selectively adust areas of an image in Lighroom. eg: a window frame in an architectural photo, and so being able to make straight lines with the adjustment brush would be very useful.
    I agree it would be useful. It's something that's been asked for. The best thing is to keep requesting at the Lightroom feature request forum

  • Any way to simulate a user drawing a straight line in Captivate 6?

    I'm trying to create a software simulation. While most of the user interaction with the software involves just clicking buttons and entering values in various fields, there is one place where the user has to draw a straight line from one point to another. Basically, I would like Captivate to dynamically display the line as it is being drawn (i.e., getting longer as the mouse moves away from the starting point).
    Is there any way this can be done in Captivate? Thanks.

    Hello,
    Welccome to Adobe Forums.
    Software Simulation (Automatic Recording) create slides on event based (Keyboard button press or Click on Mouse)
    When you draw something it will not show you the drawing at the time of recording, for that you can use Video Demo
    Thanks,
    Vikram

  • Display of document line items with user defined fields

    Hi all,
    I have created two user defined fields in CI_COBL structure and they are available on OBC4 screen. I maintained  optinal for entry in the screen layout. I posted one document with user defined fields and saved.
    Now the document is updated in BSEG table. I then display the document, and it display the doucment
    But when i double click on the one of the line items system gives an error that there is some problem in customising and entries missing in Table COBM.
    I checked OXK3 and see that in field information for user fields, it says entries maintained in table COBM.
    But still i couldnt display my line items in detail.
    Any solutions
    Thanks in advance
    Ram

    Yes your are looking at the correct sap note.
    Things look pretty straight forward in the notes documentation.
    1)Extend the VBKRED structure with the fields you want.
    2)Populate thse values in the user exit in program DBKMVF02 in FORM routine USER_EXIT_FUELLEN_XVBKRED.
    For extending a standard structure you need to create a zstructuree in se11 first and then append it to the standard structure.
    In your case you need to  extend VBKRED_EX1 structure rather than VBKRED.
    Regards,
    ravi

  • Live Tracing Help With Straight Lines

    Hi,
    I'm a web dev. I guess I'm a bit (a lot) behind the times still using CS4 and CS5. I primarily work in Photoshop and I'm trying to get better with Illustrator. One -very- common task I would -love- to be able to do efficiently in AI is something like this:
    I get a bitmap image, which to the naked eye is pretty much just straight lines. I want to import it into AI and then start tweaking. If I hand draw something with a sharpie and then scan it, it works fine. But very few bitmaps, regardless of how simple, Live Trace in a good way.
    I've bought a couple of pricey AI books and they -always- use some really complicated drawing to show how wonderful Live Trace is. And that's the irony: the more complex the bitmap, the -better- it seems to do. It's SIMPLE stuff---like -I- use everyday for web icons and buttons that it does so poorly.
    Any bitmap that has some sort of 'shaded' edge... OR is not a straight 90 or 0? fawgeddaboudit.
    Always lots of swirls and curves. And then I get frustrated trying to 'simplify'  paths.
    SO: Are there any 'ninja' secrets to doing this? I've read a couple of posts which basically say 'man up' and learn to hand draw better, but it just seems like AI is so sophisticated that it -should- do this properly and this =must= be user error.
    I'm not above girlie-man begging.
    TIA,
    ---JC

    This is a sorta typical example:
    Maybe it's a little harder than average but to -me-, AI should have some sort of 'edge detection' to convert this to about two dozen straight 'lines'.
    But what it -does- is either turn it into a mass of paisley swirls -or- if I use the 'photo' setting, the trace looks mostly like the original, BUT it's created almost 1 path for every frickin' pixel.
    What I end up doing---if I really need it---is to trace over it with the mouse, but I confess I'm a LOUSY 'pen drawer' so it often goes awry. Most often? I make a print-out, trace it on paper with a sharpie, then re-scan it into AI. And THEN it will 'Live Trace' OK... seems like a total Rube Goldberg but AI seems to -need- that sharpie.
    So... in lieu of going to pen boot camp, I was -hoping- that this was just operator error.
    Anyone?
    ---JC

  • (sqr 2515) input required user interaction but user interaction was disabled by the -XI command line

    hi ,
    i'm getting below while running sqr in 3-tier mode using process scheduler.
    (sqr 2515) input required user interaction but user interaction was disabled by the -XI command line
    can any one suggest me to resolve this problem

    You should be able to get some more precise information from your Xorg logs, but I would bet it is related to the evdev driver. Some of the options in your xorg.conf no longer work with the latest version. For now you should be able to either map your mouse directly to the appropriate /dev/event* entry or change to the standard mouse driver, both of those methods should be in the wiki.
    You are supposed to be able to use the evdev driver without the input section of your xorg.conf by using dbus/hal autodetection, but AFAIK at the moment the xorg-server package still isn't compiled with hal support, so you would have to patch and rebuild the package.

  • How to print a pdf without user interaction (With C#)

    My boss assigned me a task that to get the ImagePreview of 1st page of PDF.
    My thought is to print the 1st page of PDF to file(virtual print to file), and get the image source, but there comes the problem:
    How can print a pdf without user interaction(With C#),question are these:
    1. I can use the ShellExcute but cannot assign the destination of output file.
    2. User interface is unwanted, I don't want show anyone the Acrobat Reader interface who click the file just want to get a preview.
    3. No place to put those parameters in.
    This problem confused me a lot of days, I wish someone can give some hints.
    Thank you very much!
    (Maybe you will tell me to use Acrobat SDK, please don't, I'm afraid we cannot afford that)

    >I have not read the document yet
    This is the first step. There are many documents, but start with the
    introductory/getting started material.
    > with a index.pdx
    A PDX is a search database to allow you to do fast searching in
    Acrobat.
    >
    >About the relationship between Adobe Reader and Acrobat, as far as I know is that, the previous one is just the reading tool for PDF document, instead, Acrobat can modify and resave the PDF doc. Is it right?
    Effectively, yes. But the Acrobat SDK is mainly for working with
    Acrobat. It's very important to keep this clear, since you have said
    you only have the free Reader, so 95% of what is in the SDK cannot
    work for you.
    >
    >Simply my questions,
    >1. I don't know which dll to refer in the .Net project to print with. Is the ActiveX folder in product folder?
    Simply, there is no point asking these questions, yet, because you
    have not started on the documentation.
    But let's continue in the SDK forum, where I have posed what seems to
    be a very important question about why print to file at all.
    Aandi Inston

Maybe you are looking for

  • Windows 2008 Server Co-residency BE6000/BE7000/TRCs/Specs-Based.

    Hey, I'm trying to figure out where I can run a Windows 2008 R2 server: BE6000: seems like no based on http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/BE6000/Coresidency/9_x/BE6K_coRes.html BE7000: the data sheet has a "Co-residency Policy" l

  • How to get the transport request number of ABAP query.

    I want to find out last Transport Request  number used of a transporting changes Abap query from development to quality system. Also is it possible to do some comparison on version existing in development and quality for abap query.

  • HT1420 Problem with authorizing the computer

    Hi, I have tried to authorise a new computer with my iphone. But when i tried to install an application its still shows that the computer is not authorised. Please help me on this issue.

  • Edited photos in iOS show original photo after import or in iPhoto for MAC

    If I edit a photo using the Photos app (or one the filter integrated now with Photos app) and then import that photo to my Mac (both using iphoto or import) or PC (both using import or with cloud photo integration), and sometimes if i try to view the

  • I have PS Elements 9...Layers Pallete disappeared

    Could someone tell me what/how in the world I can restore my Layers so that when I edit my tiff files they show up in right hand column?  I have looked EVERYWHERE -- gone to Preferences, etc. -- and I cannot seem to restore the Layers to play with. T