Selecting a Line on a pane

I am struggling to get a way to click within a Pane and select a Line. The Line has been drawn by the user and there can be numerous.
For example if you select a Vertex I can just ask if it contains the point. How would you do this for a line?

I can see 2 ways :
Either double each line with an invisible larger rectangular enveloppe that will react to the user's click thus it will select their respective associated line when an envelopped is clicked on.
Or, the old way: when the parent pane receives the click event, browse the list of children lines and select the one that is closer to the click (in term of distance) and the higher in the display stack (nearest to the end of the children list).
Or increase the lines' strokes and have mouse listeners on the lines, it works too if they are not too thin to be clicked...

Similar Messages

  • How to select multiple lines in ALV report

    hi gurus,
    I am working on an interactive ALV report where i have to select multiple lines from the basic list into an internal table, based on check box clicks. Using RS_SELFIELD i can select only 1 row. The coding has been done based on Call Function. Can u please suggest some way.
    Regards,
    Satyajit

    hi,
    try like this
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    TYPES: BEGIN OF t_ekko,
      sel,                         "stores which row user has selected
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          fieldcatalog1 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    DATA : BEGIN OF det_tab OCCURS 0,
            ebeln LIKE ekpo-ebeln,
           END OF det_tab.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    FORM build_layout.
      gd_layout-box_fieldname     = 'SEL'.
      "set field name to store row selection
      gd_layout-edit              = 'X'. "makes whole ALV table editable
      gd_layout-zebra             = 'X'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = gd_repid
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'SET_STAT'
          is_layout                = gd_layout
          it_fieldcat              = fieldcatalog[]
          i_save                   = 'X'
        TABLES
          t_outtab                 = it_ekko
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDFORM.                    " DATA_RETRIEVAL
    *       FORM USER_COMMAND                                          *
    *       --> R_UCOMM                                                *
    *       --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    * Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
          IF rs_selfield-fieldname = 'EBELN'.
            READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
            SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
            CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
          ENDIF.
        WHEN 'DET'.  "button add by me
          CLEAR det_tab.
          REFRESH det_tab.
          LOOP AT it_ekko INTO wa_ekko WHERE sel = 'X'.
            MOVE-CORRESPONDING wa_ekko TO det_tab.
            APPEND det_tab.
          ENDLOOP.
          PERFORM build_cat.
          PERFORM dis_data.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  set_stat
    *       text
    *      -->RT_EXTAB   text
    FORM set_stat USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZSTAT' EXCLUDING rt_extab.
    ENDFORM.                    "set_stat
    *&      Form  build_cat
    *       text
    FORM build_cat.
      CLEAR fieldcatalog1.
      REFRESH fieldcatalog1.
      fieldcatalog1-fieldname = 'EBELN'.
      fieldcatalog1-tabname = 'DET_TAB'.
      fieldcatalog1-seltext_m = 'Order No.'.
      fieldcatalog1-outputlen = 10.
      APPEND fieldcatalog1 TO fieldcatalog1.
      CLEAR fieldcatalog1.
    ENDFORM.                    "build_cat
    *&      Form  dis_data
    *       text
    FORM dis_data.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = 'ZTEST_DS'
          it_fieldcat        = fieldcatalog1[]
          i_save             = 'X'
        TABLES
          t_outtab           = det_tab.
    ENDFORM.                    "dis_data
    here i have copied standard gui status of ALV into my z status ZSTAT and add one button DET......
    here u can select morethan one line using control(ctrl)
    reward if usefull...

  • Creating and Selecting a line in After Effects CC?

    OK, So I suppose this is a two part question...
    But there is a little thing in After Effects CC that is annopying me alot, and it could just be me, and the way I've been doing things...
    1) The way I have creating a simple Line in After effects, is by using the pen tool, placing two points, and then just using a stroke on the Shape Layer, and no fill. Is this the most efficient way to creating a line in After Effects? It's what i have always done, and it's not until CC that it has been a pain.
    2) The reason why it's inconveniencing me is when i try to select that Shape Layer in the Comp Viewer! For some reason, in CS6, when i wanted to select that line, i could just click on it, and it selects the layer, Now, when i click on the line i just made, nothing happens, no where in the line that i can click or highlight will it select the layer of that line, Instead, I have to click the very center of the composition for some reason. there is small unseen point there that i either have to click exactly, or click and drag in that area, in order to select the layer, which gets annoying if there are many line at any given moment. This point is also where the anchor point for the layer is placed.... Is there any way to change this? To be able to change some setting so that when i click on the line itself, it selects it, and to have the Anchor point be placed in the center of the two point i make?

    But I do this kind of thing all the time. The last 5 projects involved 8 stroked horizontal and vertical shape layers drawn with the path tool that I had to move around the screen. I also had a bunch of little shapes that were only 5 X 5 pixels. These layers are nearly impossible to grab in the comp window at even 200% zoom factor without inadvertently grabbing the wrong layer or scaling the layer when you try to move it in the comp window.
    It is like trying to drive a screw with a hammer. It will kind of work but you will do a much better job if you use a screwdriver and the screw will remain undamaged. Hence, selecting small assets in the timeline and moving them around with the transform properties from the timeline is using a screwdriver. Using the direct selection tool is just the wrong tool for this and it always has been. You have to have some real estate to grab on to if you expect to move a layer without scaling it.
    You can mitigate the scaling problem for small layers by adding a simple expression to scale so the layer always stays at 100% but this will just automatically fix the scale problem and won't help moving the layer around in the comp window very much.

  • Error in TCode iview Select a line or position the Cursor correctly

    Hi All,
    I am getting the below error while selecting the row in Tcode iview
    Select a line or position the Cursor correctly.
    You have not selected a delivery or a delivery item for processing and the cursor is not positioned on a valid line, even after i am
    selecting the Delivery and click on the execute button
    My system config  :
    NW04s SP 20
    Thanks&Regards
    Murthy

    Hi Murthy,
    Create the Iview again.Hope the issue will resolve.
    Thanks,
    Arun

  • How do I select a line in preview

    I open an image in Preview and select Annotate. I can add text to the image, and a line/arrow. But once the line is created, I can't select it.

    Go back to the line mode and move the cursor over the line until it turns
    from this to this
    Click once to select the line:
    OT

  • How do I change the image selected for the finalized movies pane in all events?

    How do I change the image selected for the finalized movies pane in all events? I made a movie some time ago in iMovie, and a still from this now appears as the image for Finalized Movies in the All Events pane (as well as showing up if I then click on this pane to take me to Finalized Movies). Anyone know how to change or delete this image, please?

    Unfortunately, the suggested solution in that thread does not work and the thread appears to be closed to replies.  That is, even though I am logged in the Reply|Quote|Mark as answer|Report as abuse items are missing.
    The suggested solution is:
    First, I found I had "img100.png" in  C:\Windows\Web\Screen  and
    C:\Windows\WinSxS\x86_microsoft-windows-themeui-client_31bf3856ad364e35_6.2.9200.16384_none_69ee3fa2269e545e
    1. Belonging to the Administrators Group, I replaced file Owner TrustedInstaller with my Username on both "img100.png" files
    2. After resizing the image I wanted to see on the Login screen to the resolution of "img100.png" file,
    I copied and pasted it to both "img100.png" files keeping this way the format (extension) and resolution of the original "img100.png" file,
    which I permanently deleted.
    However, I have not been able to replace the img100.pgn in C:\Windows\Web\Screen even after taking ownership of it and setting the permissions for my userid to All.  I edit it with mspaint and then try to save it. The save starts that then says the
    save was interrupted.
    The appears to be some additional protection besides the standard acls.
    http://www.saberman.com

  • How to select multiple lines in reports

    Hi,
    how to select multiple lines in a reports and process those selected lines to other activities like BDC.
    Please paste sample report here. or any demo examples . (don't paste ALV report , paste only classical report)
    suppose there are 10 records in output, i want to select 3 records and process other activities like bdc.
    Point will awarded.

    Hi ,
    the o/p in ur case will be a basic list output with a check box enabled in the left .
    Now say there are 10 records in the list output and i have checked 3 of them where checkboxes are enabled .
    And i press a button to submit this to the BDC .
    Here u need to make use of
    READ LINE statement to read the records from the list output and then pass them to the BDC .
    The code would be something like this
    DO .
    Read line index <field> where checkbox <> ' '.
    ENDO.
    You can have a look at the F1 help on read line . This will mkae u clear .
    Hope this gives u an idea.
    Regards,
    Vijay.

  • Selecting multiple lines in a sales order

    Hello documentation says we should be able to select multiple lines in a sales order (for example to cancel them or remove them). Yet we cannot select more than one. Shift and Ctrl do not seem to work.
    Any idea why this does not work ? We are running B1 2007A, patch 37.
    Thanks a lot
    Fabrice

    Hi Fabrice,
    if you have a sales order with hundreds of rows, use the 'Draw Document Wizard -> Customise' option to draw the required rows into the target document. Once all row data has been copied to the target, the row is greyed out in the sales order & can no longer be drawn. As long as the BP accepts partial deliveries, you may copy as much partial data to multiple target documents as necessary. Once you are finished with the sales order & there are rows still open, you may go to Data -> Close & hence close the entire document. There will be no need to delete the remaining rows.
    All the best,
    Kerstin

  • Select multiple lines in a sorted subsumarized ALV

    Select multiple lines in a sorted sub summarized ALV
    Hi all,
    I had to make  a Z version of ME28 transaction in order to do a PO mass release.
    The customer asked for a similar looking transaction.
    The ALV displays PO sorted and summarized by Purchase Document.
    I had a selection column to the ALV so the user can select multiple PO.
    Te problem is that I don’t know how to see wich PO’s are selected due the selection field of my output data does not get marked when I click on the Purchase Document
    As you an see in the ALV I created you can select at "header level" by clicking on the Purchasing Order row.
    But this does not affect my output table so I dont have an X on the select field.
    It does when I click on a item level.
    How can I read this marked lines?
    Thanks in advance.

    I need to release it.
    It works fine when I select an item row, cause it updates the i_output-sel = X, So I just loop it and do the mass release,
    Problem is when I try to do a seletion like in the image I've upload.
    I need to know wich line of my i_output table correspond to which subtotal Purchasing Order selectedrow.

  • Itunes - how do i select multiple line items not in sequence ?

    itunes - how do i select multiple line items not in sequence ?

    Hold down the Command key and click each in succession.
    To extend the selection across items that ARE contiguous, use the Shift key.

  • Select every lines of a tabe in one time, with Visual Composer

    Hi experts,
    I am using Visual Composer, but I meet some issues. Does any one know how to select every lines of a tables in a same time? do I need a buitton for this?
    thank you for your reply
    regards,
    Pierre

    hi Jhansi,
    thank you very much for your response.
    nevertheless, this is not what I wanted to do (perhaps I should explain better).
    In fact, what I want is is to do as if I clicked on every single line of my table, but in one time (without cliking on them one by one...)
    I do not want to short them with color, I reall want to select every one of them, but in one time.
    thanks a lot
    regards,
    pierre

  • How to select valid lines in a secondary list in a interactive report

    hi
    how to select valid lines in a secondary list in a interactive report

    hi,
    do this one
    at line-selection.
    if sy-lsind = some list no.
    GET CURSOR FIELD FIELDNAME VALUE FIELDVALUE.
            IF FIELDNAME = 'TVBAK-VBELN'.
    do some thing
    Regards
    ASHOK KUMAR

  • Selection of line item

    hi,
    Hi,
    i want to select the lines in table control of transaction va02 and then want to delete that line through a program for selection, but how can i know that this line is selected and then proceed further.
    regards
    m.phanindra

    Hi
       I may not give you the exact answer, but i think this will give you an idea in solving your issue.
       1) When we select some line from the list, then 'AT LINE-SELECTION' event will get triggered... You can write the required coding in this block of the code.
       2) Inorder know which line is selected, we use the HIDE area for that.
       ex: HIDE: wa_spfli-carrid,
                      wa_spfli-connid.
        This HIDE will store all the field values which come through it, and When a row is selected the data that has been hidden for that particular row will be made available again in the AT LINE-SELECTION block.
       Hope this will help you.
    Thanks
    Ravi

  • MIRO Deselect and select Multiple line items

    Hi All,
    At the time of miro we are taking the reference of PO. In PO we have 1200 lines related to Custom duty, additional custom duty, ecess, clearing and forwarding charges and freight.
    we want to do the MIRO for custom duty, additional duty and freight only, for these we have 600 line items. we need to select these lines one by one. this is time taking job.
    can any body tell me that how we can select these line at once.
    Regards all

    Hi,
    You can make use of Planned Delivery cost in the PO Refernce Tab. This will cover all other costs other than you basic material or service cost.
    Regards,
    amit

  • Select single line in ALV with FM REUSE_ALV_GRID_DISPLAY

    Hi!
    How can i set for select just a single line in ALV? I´m using FM REUSE_ALV_GRID_DISPLAY and in layout structure doesn´t has field SEL_MODE for set.
    In my ALV, in left site of colum names has a buttom for select all lines. I would like to hide this buttom. I removed this buttom from toolbar but it appear in left side of colum names yet.
    Anybody can help me?

    I do that but buttom just disappear from toolbar. It still appear in left side of colum name.
    My code:
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_callback_user_command  = 'ALV_USER_COMMAND'
          i_callback_pf_status_set = 'F_SET_PF_STATUS'
          is_layout                = gs_layout
          it_fieldcat              = gw_fieldcat
        TABLES
          t_outtab                 = gw_relat
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    FORM f_set_pf_status USING t_kkblo_t_extab.
      DATA: lw_fcode TYPE TABLE OF sy-ucomm.
      APPEND '&ALL' TO lw_fcode.
      APPEND '&SAL' TO lw_fcode.
      SET PF-STATUS 'ALV_STATUS_GUI' EXCLUDING lw_fcode.
    ENDFORM.                    "F_SET_PF_STATUS

Maybe you are looking for

  • Shopping for a new hard drive

    My ancient white Macbook's hard drive failed.  The Genius Bar said to buy a new drive online and they'd install it for me.  But they didn't say what to buy.  Are their limitations i should be aware of?  Brands to look for or avoid?  Size?  RPM? GB? R

  • How to Check Enhancement Pack of ECC system

    Hi Experts, I want to check enhancement pack of My SAP R/3 ECC 6.0 system. Where can i find this information can you please help. In System --> Status --> in component version i can see "SAP ECC 6.0". On click of the button provided below this compon

  • TROUBLING INSTALLING PROGRAMS

    Our PC is a TouchSmart 310 1025a model.  It runs on Windows 7. There is something wrong with it installing programs.  We had a problem where our printer stopped working a couple of months ago.  My husband tried to re-install it and couldn't so assume

  • Recovery disc for pavilion/dvl6604cl

    Please tell me how to order a recovery disc for the pavilion dl6604cl notebook.  My harddrive has failed and the Geek squad needs the recovery disc to get my notebook back on line.  I can't find where to order the disc.

  • AQ subscriber exception

    Using native java AQ, a subscriber makes deque call from a seperate process and dies before retrieving the process. How will AQ handle this exception.