Need script to handle event on button.

Hi All,
         I need to handle some event on Button click.
My requirement is quite simple. There is a DropDown List in PDF and a button.
Depending the value selected by the user in DropDownList i want to display relevent blocks(Subforms) in PDF on Button Click. All the Blocks are made hidden initially.
i.e User will select a value from Drop Down and click on 'Display' Button then
I want to make Any peticular Subform Visible.
I am unable to write scripting for it. Can anybody please help.
Thanks and Regards,
Atul.

Hi,
your adobe form must be dynamic for this functionality.
Do you have Acrobat Reader 7.0 or later?
Does it work in PDF Preview? If not, go to menu Edit -> Form Properties in LiveCycle Designer, tab Defaults. Preview Type must be Interactive Form, XDP Preview Format must be Acrobat 7.x Dynamic PDF.
Does it work in PDF Preview now? If not your script is wrong.
If you use Java WebDynpro, you must insert following code in wdDoModifyView:
  if(firstTime) {
    IWDInteractiveForm iForm = (IWDInteractiveForm)view.getElement("YOUR FORM");
    iForm.setDynamicPDF(true);
If you use ABAP and you create pdf by function module, you must set dynamic = 'X' in structere for exporting parameter /1BCDWB/DOCPARAMS .
Michal

Similar Messages

  • Need Suggestion on handling events

    I have 2 caches . The 1st cache is populated with more than million records .The 2nd cache has a real time feed populating the cache and updating it quite frequently . I have a requirement of doing some calculation on 1st cache based on updates happening in 2nd cache.
    What is best way to handle the events happening on 2nd cache? Should i use backing map listeners or handle the event from client side and run a entry processor to do the calculations on Cache1 ?

    Use an EntryProcessor on Cache1 (positions) to perform the updates to Position objects. Position calculations are usually pretty simple, so the use of an EP is probably fine. You'll want to gather the list of target position keys before doing the invokeAll() call, so all the affected Positions are updated in parallel.
    As to how you trigger the EP, a listener on cache1 would be one approach. Make sure the caches are running on separate services to avoid re-entrancy issues.
    We use the EP approach for our Position updates and find we can process many tens of thousands / second using EPs.
    You'll probably also want to re-use the above ideas in order to maintain an audit trail, as this would normally be in a separate cache (i.e. not in the Positions cache) and written-behind to a db.
    If your price-change notifications are so frequent that they exceed your ability to process them (even using invokeAll on EPs), then you might want to look at some form of async processing. The CommandPattern in the Incubator is one such example; of course you could also roll your own.
    Cheers,
    Steve

  • Tab strip - handling event of button on one of tabs

    Hallo,
    I used wizard for creating tab strip. I put button on certain tab. I'd like to change screen of current tab after click on this button. I'm not interested in change whole screen, but screen of mentioned tab in tab strip (tab strip is always visible, only tab subscreen is changing).
    Can anybody help me?
    Best regards,
    Josef Motl

    Ok, I just tested it.  You can modify the subscreen by using the LOOP at SCREEN procedure in the PBO of the subscreen.  Look at the following example.  main screen is 100, the tabstrip subscreens are 101, 102, 103. I have one field PTEST1 on subscreen 101.  I am making it output.
    report zrich_0002.
    start-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    module status_0100 output.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
    endmodule.                
    * FUNCTION CODES FOR TABSTRIP 'TAB1'
    constants: begin of c_tab1,
                 tab1 like sy-ucomm value 'TAB1_FC1',
                 tab2 like sy-ucomm value 'TAB1_FC2',
                 tab3 like sy-ucomm value 'TAB1_FC3',
               end of c_tab1.
    * DATA FOR TABSTRIP 'TAB1'
    controls:  tab1 type tabstrip.
    data:      begin of g_tab1,
                 subscreen   like sy-dynnr,
                 prog        like sy-repid value 'ZRICH_0002',
                 pressed_tab like sy-ucomm value c_tab1-tab1,
               end of g_tab1.
    data:      ok_code like sy-ucomm.
    * OUTPUT MODULE FOR TABSTRIP 'TAB1': SETS ACTIVE TAB
    module tab1_active_tab_set output.
      tab1-activetab = g_tab1-pressed_tab.
      case g_tab1-pressed_tab.
        when c_tab1-tab1.
          g_tab1-subscreen = '0101'.
        when c_tab1-tab2.
          g_tab1-subscreen = '0102'.
        when c_tab1-tab3.
          g_tab1-subscreen = '0103'.
        when others.
    *      DO NOTHING
      endcase.
    endmodule.
    * INPUT MODULE FOR TABSTRIP 'TAB1': GETS ACTIVE TAB
    module tab1_active_tab_get input.
      ok_code = sy-ucomm.
      case ok_code.
        when c_tab1-tab1.
          g_tab1-pressed_tab = c_tab1-tab1.
        when c_tab1-tab2.
          g_tab1-pressed_tab = c_tab1-tab2.
        when c_tab1-tab3.
          g_tab1-pressed_tab = c_tab1-tab3.
        when others.
    *      DO NOTHING
      endcase.
    endmodule.
    *&      Module  STATUS_0110  OUTPUT
    *       text
    module status_0110 output.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
    <b>  loop at screen.
        if screen-name = 'PTEST1'.
          screen-input = '0'.
          modify screen.
        endif.
      endloop.</b>
    endmodule.                
    Regards,
    Rich Heilman

  • How to handle event structures for two buttons and two counters.

         *I have two buttons A and B, and have to compare the difference in hits between them.  So do I place an event structure within a while loop for each button (2 buttons, 2 event structures, 2 while loops), or does it need to be one event structure with cases for both buttons whithin one while loop? 
         *How do I pass the values of buttons A and B's hit counters out of the while loop in order to calculate the differences between them after each increment, not just the final count after the stop button is hit? 
         *How would I make one stop button work to handle both buttons A and B?   I tried to place the actual stop button in one button A's structure and its global in B's structure, but It wont seem to let me use a local variable for a latchable control
    Checker

    You should probably have not started a new thread and waited until your question in the original thread was answered. You can modify altenbach's example for a second button. You have a single event structure with a new event for the second button. You have a second shift register to track the number of times the second button is pressed. Inside the while loop but outside the event structure, you just have a subtract function in or to report the difference. do not modify the posted example for the stop button. It works perfectly as is.

  • How to find event handler for save button in salesorders

    Hi,
    I want perform event based on save button in salesorders.Can you tell me how to find the event handler for
    save button.
    Regards,
    Brahmaji

    Brahma,
    you can find the component, view details by doing an F2.
    open the component, the view will be mostly an overview page i.e., the name ends OP etc.,
    But your method name will be mostly EH_ONSAVE, you need to find exact view.
    F2 does not come up properly for overview pages, you have to look into UI config tool preview and make sure sometimes.
    Regards,
    Masood Imrani S.

  • How to handle events in Swng

    Hi!
    I would like to know which one of the following is the best way to handle events in Swing application.
    Method 1
    Write annonymus inner classes in the same class
    Method 2
    =======
    Write a seperate class which extends the adapter class of the event handling and create an object of that in the main class and assign it to the components with addActionHandler() method.
    I am trying to use the second one and I have the following design issue.
    I have a class frmMain.java in which I have a frame and to that frame I am adding a panel which consists of 'N' No. of components.
    I want to make this panel added to the frame when I click on a menu item (login) and want to remove the panel from frame when I click on a menu item(logout).
    I have a main class called Application.java where I create the object of my frame(frmMain.java).
    Thanks in advance,
    AV

    1. Your JFrame is now subject to receive action events from anywhere. You will have to be more careful that you respond only to the right events.
    2. If you have a lot of possible consequences to an event(for example, based on button pressed), you'll need a long if...then...else statement to determine what to do based on the source of the event.
    3. With individual ActionListener classes, it's easier to add the same listener to multiple components and no need to worry about source.
    4. Kind of the same thing: With individual classes, the event and its consequences are so tightly coupled.
    End preaching....basically, my style boils down to what I call the tool set vs Swiss army knife rule. Java seems designed around the concept of a large number of specific purpose classes vs a smaller number of multi purpose classes and I think its a design methodology that makes sense, because I believe strongly in functional isolation in my code.

  • Handling events in ALV grid

    hi,
    Hi,
    I am displaying some fields from VBAP in ALV gid and have give drop down check box to storage location making it editable  so  if the user changes Storage location  of
    some entries and clicks SAVE button, when we click save button i need to capture all the rows that were been changed and update VA02 using these records through bapi.
    but iam not able to capture this SAVE event but iam able to capture Enter and cursor event.
    i have written following code for this
    LOCAL CLASSES: Definition
    class lcl_event_receiver: local class to handle event CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
          handle_data_changed
             FOR EVENT data_changed OF cl_gui_alv_grid
                 IMPORTING er_data_changed.
      PRIVATE SECTION.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    LOCAL CLASSES: Implementation
    class lcl_event_receiver (Implementation)
    CLASS lcl_event_receiver IMPLEMENTATION.
        METHOD handle_data_changed.
        DATA: l_error_in_data TYPE c.
        PERFORM handle_data_changed USING er_data_changed l_error_in_data.
    *§7.Display application log if an error has occured.
        IF l_error_in_data EQ 'X'.
          CALL METHOD er_data_changed->display_protocol.
        ENDIF.
      ENDMETHOD.                    "handle_data_changed
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
    *&      Form  handle_data_changed
         Identify columns which were changed and check input
         -->P_ER_DATA_CHANGED  text
    FORM handle_data_changed  USING  p_er_data_changed
                              TYPE REF TO cl_alv_changed_data_protocol
                              p_error_in_data TYPE c.
      DATA : lw_mod_cell TYPE lvc_s_modi ,
             l_value TYPE lvc_value ,
             l_lgort TYPE lgort_d.
      SORT p_er_data_changed->mt_mod_cells BY row_id .
      LOOP AT p_er_data_changed->mt_mod_cells INTO lw_mod_cell
                              WHERE fieldname = 'LGORT'.
        CALL METHOD p_er_data_changed->get_cell_value
          EXPORTING
            i_row_id    = lw_mod_cell-row_id
            i_fieldname = 'LGORT'
          IMPORTING
            e_value     = l_value.
        SELECT SINGLE lgort FROM t001l INTO l_lgort WHERE werks = p_werks
                                                    AND   lgort = l_value.
        IF sy-subrc NE 0.
    In case of error, create a protocol entry in the *application log.
          CALL METHOD p_er_data_changed->add_protocol_entry
            EXPORTING
              i_msgid     = '0K'
              i_msgno     = '000'
              i_msgty     = 'E'
              i_msgv1     = text-003
              i_msgv2     = l_value
              i_msgv3     = text-004
              i_fieldname = lw_mod_cell-fieldname
              i_row_id    = lw_mod_cell-row_id.
          p_error_in_data  = 'X'.
          EXIT.
        ELSE.
    *§5b.If the value is valid change values of
       cells.
          CALL METHOD p_er_data_changed->modify_cell
            EXPORTING
              i_row_id    = lw_mod_cell-row_id
              i_fieldname = lw_mod_cell-fieldname
              i_value     = l_value.
          READ TABLE t_list1 INTO w_list1 INDEX lw_mod_cell-row_id.
          IF sy-subrc EQ 0.
    *comparing old value with the changed value
            IF w_list1-lgort <> l_value.
              MOVE:      w_list1-werks  TO w_list3-werks,
                         w_list1-matnr  TO w_list3-matnr,
                         w_list1-arktx  TO w_list3-arktx,
                         w_list1-vbeln  TO w_list3-vbeln,
                         w_list1-posnr  TO w_list3-posnr,
                         w_list1-pstyv  TO w_list3-pstyv,
                         w_list1-vstel  TO w_list3-vstel,
                         w_list1-auart  TO w_list3-auart,
                         w_list1-kwmeng TO w_list3-kwmeng,
                         w_list1-vrkme  TO w_list3-vrkme,
                         w_list1-mbdat  TO w_list3-mbdat,
                         l_value        TO w_list3-lgort.
              APPEND w_list3 TO t_list3.
    *t_list3 will contain all the records that are changed
              CLEAR w_list3.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAIN100'.
      IF go_custom_container IS INITIAL.
    create a custom container control for our ALV Control
        CREATE OBJECT go_custom_container
          EXPORTING
            container_name              = g_cont_on_main
                EXCEPTIONS
                    cntl_error = 1
                    cntl_system_error = 2
                    create_error = 3
                    lifetime_error = 4
                    lifetime_dynpro_dynpro_link = 5.
        IF sy-subrc NE 0.
    Display error message.
          CALL FUNCTION 'POPUP_TO_INFORM'
            EXPORTING
              titel = sy-repid
              txt2  = sy-subrc
              txt1  = 'The control could not be created'.
        ENDIF.
    create an instance of alv control
        CREATE OBJECT go_grid
          EXPORTING
            i_parent          = go_custom_container.
    *If display or change radio button is cheked
        IF ( p_chng = 'X' OR p_disp = 'X' ) .
    Set a titlebar for the grid control
          g_layout-grid_title = 'Sales Orders'.
          g_layout-excp_fname = 'TRAFFIC_LIGHT'.
    Define a drop down table.
          PERFORM set_drdn_table.
          CALL METHOD go_grid->set_table_for_first_display
            EXPORTING
              is_layout                     = g_layout
            CHANGING
              it_outtab                     = t_list1
              it_fieldcatalog               = t_fieldcat1
            EXCEPTIONS
              invalid_parameter_combination = 1
              program_error                 = 2
              too_many_lines                = 3
              OTHERS                        = 4.
          IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
        ENDIF.
    register ENTER and CURSOR to raise event DATA_CHANGED.
      (Per default the user may check data by using the check icon).
        CALL METHOD go_grid->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_enter.
        CALL METHOD go_grid->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_modified.
        CREATE OBJECT g_event_receiver.
        SET HANDLER g_event_receiver->handle_double_click  FOR go_grid.
        SET HANDLER g_event_receiver->handle_hotspot_click FOR  go_grid .
        SET HANDLER g_event_receiver->handle_data_changed  FOR  go_grid .
      ENDIF.
      CALL METHOD cl_gui_control=>set_focus
        EXPORTING
          control = go_grid.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      ok_code = sy-ucomm.
      CASE ok_code.
        WHEN 'EXIT'.
          PERFORM exit_program.
        WHEN 'SAVE'.
          PERFORM update_sales_order using t_list3[].
    endcase.
    Thanks in Advance,
    Siri

    Hi Sirisha,
              You can get the event code for Enter because you have regitered in the event reciever .
    But for the SAVE you will have to set in the PF-status of the screen and not the ALV-grid save .
    Please award if helpful.

  • Handling Events in OOPS ALV

    Hi All,
          I am using ALV OOPS for handling events.I have a scenario like in my ALV, i will change/insert/delete the records, i need to update the DB table when i press the save button.
    I need to throw an error if the user enters an invalid data like (material number which is not present in Mara table) How can i handle this using Events in OOPS?
    Can anyone send any sample code if you any ??
    Thanks in Advance...

    Hi
    Check the following link.
    EVENTS IN ALV OOPS
    hope you got your solution
    Regards
    Sachin

  • How to throw and handle event defined in component interface

    Hi folks,
    I have defined a component interface with an event 'open_info'
    I have some sub components which are implementing that component interface. I also get the two events generated (the interface check box is not marked)
    I use those sub components and try to handle the event. but unfortunately the event is not handled.
    I'm not sure if I do everything right. I checked the interface checkbox at the events tab of the controller of the sub component. I then may handle the event in the embedding main component. but it appears to be a different event.
    probably I eed to access the interface controller and throw the event there, but I don't know how.
    I couldn't fnd documentation or wdr* components which deal with that issue. do you have any suggestions?
    regards
    stefan

    Hi Stefan,
    Do the following in the component being used:
    say component name is ZCMP_01
    go to COMPONENTCONTROLLER
    Create an Event with necessary parameters if needed, say Event name is EVNT_01 and has an importing parameter, say PARAM_01 type char10,
    Make sure you have set the interface check box. Now this event is available in the INTERFACECONTROLLER.
    Say ZCMP_01 has a view with a button, on click of the button, call a method in the COMPONENTCONTROLLER.
    Perform all the required operations, At the required point, fire EVNT_01
    wd_this->fire_EVNT_01_evt(
          PARAM_01 = 'sample' ).
    Now the other component that has to use ZCMP_01, say ZCMP_02
    In the component properties od ZCMP_02, add usage for ZCMP_01, say USG_CMP_01
    Go to the view in ZCMP_02 where you wish to handle the event EVNT_01 of ZCMP_01,
    Go to Methods tab, create an event hadler, say EVNT_01_HNDLR ... method type = Event Handler,
    Event = EVNT_01, Controller = INTERFACECONTROLLER, Component Use, USG_CMP_01.
    Now your event handler will have foll parametrs: WDEVENT .. type ref to CL_WD_CUSTOM_EVENT,
    PARAM_01 type CHAR10
    Handle the event as required.
    Regards,
    Reema.

  • Scripting Multiple Behaviors for One Button

    Dear Jimmy,
    This question is similar but different to the ones you helped me with a few weeks ago but different enough I need some assistance. Posted this last week, no one has yet to answer. Hope your on line today.
    I now need to replalce the text that read "Invalid until Submitted" and then changed and read "Submitted and Valid" after the Submit Button has been clicked to something a little different.
    I now need text to read "Draft for Review" on the form until the submit button is clicked. This text "Draft for Review" needs to disappears or become invisible after the email button has been clicked on the form.
    Additionally, I need a date on the form to be filled in before the form user can email the form out.
    I now need the form to:
    (1) require a date field entry in a date/time box in order to submit the form by email.
    (2) take the serial number from a field and put it in the email submect line.
    and (3) make the text "Draft for Review" text disappear or become invisible,
    ALL 3 need to happen, when the submit button is clicked. (Which is a button, not an email button now).
    Can you tell me why the scripting I have below will give the message when the button is clicked. I want, "Please enter the date the Silver Coverage Inclusions were explained" if the date is not entered. However, without a date being entered, proceed to open email without making form user enter the date after they click OK when the request message to enter the date come up? This allows the form to be sent WITHOUT the form user really entereing the date because the email opens up next.
    Fortunately, my "Draft for Review" text disappears.
    The Scripting being used is (combination of some you gave):
    if(T100.rawValue == null)
    app.alert("Please enter date selling dealer explained Silver Level Coverage Inclusions.");
    xfa.host.setFocus("T100");
    StaticText3.presence = "invisible";
    var emailSubject = serialNumber.rawValue;
    var myDoc = event.target;
    myDoc.mailDoc(
    false,
    "[email protected]",
    "[email protected]",
    "[email protected]",
    emailSubject,
    "Email body goes here."
    Can you tell me how to make all three work together correctly and in the 1,2,3, order from above?
    Thank you,
    Victoria Holt
    To post a message, compose your text in the box below, then click on Post (below) to send the message.
    A blank line starts a new paragraph

    Dear Jimmy,
    Thank you! This worked.
    Your really really GREAT at this.
    I have several very specific questions I need answered to make a couple of other forms work.
    I need help with a similar but different submit button.
    I also need assistance with formatting a few numeric and alpha numeric fields.
    I thought you might work with Adobe but later this afternoon soon a link with an email that seemed to indicate you might be affiliated with Pac Bell.
    My questions is since I need some more specific help rather quickly would you it be alright with you and ethically correct for me to comission you to help me by telephone and email on our off hours tonight and some Saturday?
    I do hope so. If you would be as kind please let me know how you would like to exchange phone numbers and/or email.
    Thank you again. I do look forward to a reply. I hope you can help.
    Best regards,
    Victoria HOlt

  • Custom FPM Event for Button row element

    Hi Expects,
    I have created a new button row element in standard screen, where I want to add custom FPM event and handle the same in get_data( ). But by default SAP is providing few event ID's in drop down.
    Please help me how to add custom FPM event for  button row element.
    Regards,
    Reny Richard

    Hi Remy,
    Process Event method does have any signature parameters in it which allow us to disable/enable buttons.
    We can handle this in Get data method.Get Data is always triggered after Process Event. So you can write that in Get Data instead.
    ****this is a sample code to do the same. You can do a read as well if single button needs tobe handled***
    LOOP AT CT_ACTION_USAGE INTO lw_action WHERE id = (your event id for the button).
        lw_action-enabled = abap_false.
        MODIFY CT_ACTION_USAGE FROM lw_action TRANSPORTING enabled.
        EV_ACTION_USAGE_CHANGED = 'X'.
    ENDLOOP.
    ***use field symbol to avoid modify if you want***

  • How to handle the OK button of the parameters prompt of a crystal report

    Hi,
    how to handle the OK button of the parameters prompt of a crystal report in vba.NET?
    I want to use the parameter prompt from the crystal report itself and I want to know when the report is ready. I need to export programatically by sending email to a list of employees after the parameters has been set. The emails I send depends on the results of the report.
    Im using a CrystalReportViewer control  in VS2010 and Crystal Report for VS2010 v13.0.1.220.

    Right. But the parameter screen is driven by the viewer. Unless you create your own parameter screen and pass the parameters to the report via code.
    Another thing I am not sure about:
    "Then by code I want to read all the employees id from the report and send email to them with specified pages of the report. (1 page per employee)"
    How do you plan on reading the employee ID from the report? I am not aware of any API that will read a value in a report so that you can then decide what page to send to whom.
    I think you're approaching this kinda backwards. A question to ask is; can you do what you are trying to do in code in the CR designer? If not, using APIs will not work either. I suspect your approach should be a report that uses an employee filter. Run the report for employee x, get the report populated with the data for that employee and email it. Repeat for employee x1, employee x2, etc.
    - Ludek

  • Dynamic Creation of list box on excel sheet and handling events

    hi all ,
    i m working on excel to sap integration application and for that i need to create dynmicaly list boxes in excel and also needs to handler events of each boxes..
    please suggest me somehting asap/
    thanks in advance,
    jigs
    helpful ans will be rewarded.

    hi all ,
    i m working on excel to sap integration application and for that i need to create dynmicaly list boxes in excel and also needs to handler events of each boxes..
    please suggest me somehting asap/
    thanks in advance,
    jigs
    helpful ans will be rewarded.

  • How to handle the global buttons in PFR

    Dear friends,
    i want to handle the global buttons in Process From Request
    the requirement is in standard page , we have created one custom link as global button
    when we click that link we are calling to previous page..now we want handle this global link in PFR
    how to go ahead?? please it is very urgent
    Thanks
    krish.

    Hi,
    We can get handle to global buttons using this:
    OAPageLayoutBean page = pageContext.getPageLayoutBean();
    page.prepareForRendering(pageContext);
    OAGlobalButtonBarBean buttons = (OAGlobalButtonBarBean)page.getGlobalButtons();
    //OAF automatically assigns global buttons to their corresponding function name
    OAGlobalButtonBean button = (OAGlobalButtonBarBean)buttons.findIndexedChildRecursive("<FUNCTION_NAME>");
    You can catch event for your global button in PFR and write the logic there.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Handling events in subvis - think this should work but it doesn't.

    In part of a large project I need to handle key down events, but elsewhere I need to handle them differently and want to be able to dynamically register and unregister them in each location. I also want to be able to put one of the event handlers in a subvi. To quote the Help system, "Dynamically Registering Events: With dynamic registration, you can handle events in a subVI rather than only in the VI where the events are generated."
    ViThatHandlesEvents.vi handles key down events. It uses dynamic event registration to demonstrate that it works (though in this simple example it isn't necessary).
    ViContainingSubviThatHandlesEvents registers key down events and passes this to KeyDnEventHndlrSubVI. I thought it would work but it doesn't.
    Attachments:
    KeyDnEventHndlrSubVI.vi ‏14 KB
    ViThatHandlesEvent.vi ‏22 KB
    ViContainingSubviThatHandlesEvent.vi ‏18 KB

    cebailey wrote:
    Here's a version with Panel > OwningVI > Key Down selected in the nodes that register events. It seems to do what I want. It acts on keystrokes that occur when the cursor isn't even over the parent's window, which is good in my situation. I made these choices by experimenting - is this a good approach, if I want to act on all the keystrokes that occur when the parent VI has focus?
    As you noted, this will have the event structure respond to keypresses whenever the parent VI is active. You can simplify the subVI by simply wiring the "VI Refnum" terminal directly to the Register for Events node. Getting the Panel, and then the Owning VI simply gets you back to where you started.
    That's a valid way of doing it, and I'm assuming that this is intended to be a test case. As you noted you have a large project, so I don't know what your overall architecture is, or how you intend to use this technique, so I can't really say whether it's a "good" approach. It's an approach.
    Say, I should have said this before, but you have to be pretty good to answer the question somebody should be asking, especially in brief forum postings.
    Thanks for the compliment. It's just a matter of seeing a lot of code and a lot of questions. I'm only a teenage pup compared to the real veterans on this board.

Maybe you are looking for

  • Always having the same info in the IDOC when sending to R3

    Hi. I have a FILE -> XI -> R3 (IDOC) scenario. The problem that i'm having is that the IDOC that is arriving to R3 is arriving with the same info. It doesn't matter the info that is comming in the FILE. The IDOC is being filled with an old info. Any

  • Problem with Themes - can't print photos

    Hello, When I try to print a photo I get an error message "No Available Themes- there were no themes located, until at least one theme has been installed this feature will be unavailable". I guess I'm going to have to reinstall iphoto - but what's th

  • Migrate from PS Album SE 3.2 to PS Elements 9?

    Hello everybody. I've been using Adobe PhotoShop Album SE 3.2 to import and organize the pictures taken with my iPhone 3Gs. Then I changed my iPhone 3Gs with the new iPhone 4 and suddenly PS Album 3.2 stopped working and it didn't import pictures any

  • Table Technical settings for transfer data from developemnt to Quality

    Hi All, Please let me know which table techinical settings required for to transport table with data from development to quality? Thanks & Regards, padmaja.

  • Update my mac mini to mavericks and stay compatible?

    Planning to update my mac mini to new mavericks operating system this week, but am concerned about my old, but loved, ipad. The ipad is the original ipad that I sync with the photos and music on my mac mini. Ipad is running ios 5.1.1. Anyone know of