How to Click Button by pressing spacebar?

Is there anyway that I can get a button clicked by pressing the keyboard spacebar?
Message was edited by:
Rumpi

Is there anyway that I can get a button clicked by pressing the keyboard spacebar?
Message was edited by:
Rumpi

Similar Messages

  • How to click button in exported SWF to go to frame in parent SWF?

    I looked online, but couldn't find anything helpful.   I got these codes on the web, but they're not working.... (I'm pretty new to flash).
    projectgallery.swf - PARENT SWF
    projectgallery_cutLimestone.swf - EXPORT SWF
    returnToAlbums_btn_inst - instance of a button on the export swf that I want to be able to click to go to a different frame in the parent SWF
    Here are my codes:
    on the parent SWF:
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    var myLoader:Loader = new Loader();
    var url:URLRequest = new URLRequest("projectgallery_cutlimestone.swf");
    myLoader.load(url);
    function loadHandler (event:Event) {
              var projectgallery_cutlimestone:MovieClip = event.target.content;
              addChild(myLoader);
              trace(projectgallery_cutlimestone);
              function returnToAlbums (event:MouseEvent):void {
                        projectgallery_cutlimestone.returnToAlbums_btn_inst.play();
              projectgallery_cutlimestone.addEventListener(MouseEvent.CLICK, returnToAlbums);
    myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadHandler);
    When I try it, the SWF loads fine, but when it loads, this OUTPUT error appears:
    [object Main]
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/frame2()
              at flash.display::MovieClip/gotoAndStop()
              at Main/preload1()
    then, when I try to click the button returnToAlbums_btn_inst, this OUTPUT error appears:
    ReferenceError: Error #1069: Property play not found on flash.display.SimpleButton and there is no default value.
              at Function/<anonymous>()
    I'm really new to flash, so I don't know why it's not working.  The instance is labeled (I double-checked).

    Export SWF works without error now, but parent SWF returns:
    TypeError: Error #2007: Parameter child must be non-null.
              at flash.display::DisplayObjectContainer/addChild()
              at Main/frame3()
              at flash.display::MovieClip/gotoAndStop()
              at Main/gotoCutLimestone()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Main/preload1()
    under OUTPUT when I try to load the SWF.  The returnToAlbums_btn_inst doesn't work still either.

  • HT201365 I just updated to ios 7 on my iPhone 4 how do you turn the apps off when your not using them? The old way of double clicking and then pressing the app until a red minus button comes doesn't work it opens it back up!?

    I just updated to ios 7 on my iPhone 4 how do you turn the apps off when your not using them? The old way of double clicking and then pressing the app until a red minus button comes doesn't work it opens it back up!?

    Double click home button, then swipe up on app picture (not the icon itself)

  • How to trace toolbar find button icon pressed or click?

    Hi Experts,
    I am not able to trace the event "toolbar find button icon pressed or click" for my UDO generator form.
    My problem:
    i hv a  UDO generator form, in which i hv taken a picturebox. when i add picture or update picture it is added or updated successfully. but when i click on the find button of toolbar menu of sbo, then the picturebox  should be blank ie. there should be no picture shown in picturebox. but, in my form the picture is not disappearing. 
    Please help me out.
    Thanking You
    vishwajit kumar

    Hi
    Try this
    Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
            If pVal.BeforeAction = False Then
                SBO_Application.SetStatusBarMessage("Menu item: " & pVal.MenuUID & " sent an event BEFORE SAP Business One processes it.", SAPbouiCOM.BoMessageTime.bmt_Long, True)
                Select Case pVal.MenuUID
                    Case "1281"
                        oPictureBox.Picture = ""
                End Select
                End If
        End Sub
    Hope this helps
    Regards
    Arun

  • Fire a left click when the right button is pressed

    I am working on a small program with a text area and mouse functionality. I have all my listeners in place but I need one additional feature and I am unsure how to go about implementing it. I want to be able to fire a left click when the right button is pressed.
    The reason is because right clicking does not move the caret around the text area. I need to be able to move the caret with a right click so I can then invoke another method to do some other functionality that is associated with the right click. Any method is acceptable as long as a right click will result in the caret being able to move to a location much like a left click can.
    all help is appreciated. Thanks.

    I'm not sure if this is "better", and my guess is that it isn't, but how about using a Robot object here to create a left mouse press and release? For instance,
    import java.awt.AWTException;
    import java.awt.Robot;
    import java.awt.event.InputEvent;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JComponent;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    public class RightClickAsLeft
      private JPanel mainPanel = new JPanel();
      private JTextArea area = new JTextArea(20, 50);
      private Robot robot;
      public RightClickAsLeft()
        try
          robot = new Robot();
        catch (AWTException e)
          // TODO Auto-generated catch block
          e.printStackTrace();
        mainPanel.add(new JScrollPane(area));
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < 18; i++)
          for (int j = 0; j < 80; j++)
            sb.append((char)(40 + j));
          sb.append("\n");
        area.setText(sb.toString());
        area.addMouseListener(new MyMouseListener());
      public JComponent getComponent()
        return mainPanel;
      private class MyMouseListener extends MouseAdapter
        @Override
        public void mouseClicked(MouseEvent e)
          int button = e.getButton();
          if (button == MouseEvent.BUTTON3)
            if (robot != null)
              robot.mousePress(InputEvent.BUTTON1_MASK);
              robot.mouseRelease(InputEvent.BUTTON1_MASK);
      private static void createAndShowUI()
        JFrame frame = new JFrame("RightClickAsLeft");
        frame.getContentPane().add(new RightClickAsLeft().getComponent());
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
      public static void main(String[] args)
        java.awt.EventQueue.invokeLater(new Runnable()
          public void run()
            createAndShowUI();
    }Edited by: Encephalopathic on Apr 10, 2009 9:59 AM

  • How to disable button immediately after pressing

    Hi
    In my save button there is a code for insertion of data in database.
    In my application when i press save button first time the IE progress bar shows progress but if suppose the user presses the button again
    then the data wil get saved twice.
    Now if i put a code in button action method to disable it will function only when it will be called in between user can press the button.
    How to arrest users for clicking???
    If you have any idea please help me out.

    How about setting the button to:
    yourButton.setVisible(false);
    So when your button action is called, this is the first action that is called before your code insertion lines so the button will disappear when clicked e.g.
    public String yourButton_action {
    yourButton.setVisible(false);
    ....code insert data......
    return null;
    Or set the "return null" to return a new page.
    Of course, if you wanted it to be visible again after the insertion then you would set
    yourButton.setVisible(true);
    Alternatively, you could setup a counter that would check the number of times the button was pressed and make the button visible (or invisible!) when conditions are met.

  • How to set/change spell value after button is pressed

    Hi All,
    I have a requirement, I need to change the spell value(Boolean) dynamically based on the sitution. (say for eg. If i click search spell (ReadOnly) variable shouldbe set to TRUE.like that ..
    I have create a dummy VO and in that VO I have created spell variables.
    Can some one help me how to do this when a button is pressed, I wrote code after buttton pressed it's throwing the below error.
    if(pageContext.getParameter("Create")!=null)
    OAViewObject disvo = (OAViewObject)am.findViewObject("XxafpEepStageRebateValidateVO1");
    OARow row1 = (OARow)disvo.first();
    row1.setAttribute("ItemProperty", Boolean.FALSE);
    row1.setAttribute("ReadOnly", Boolean.TRUE);
    call another page..
    Error(102,6): class OAViewObject not found in class xxafp.oracle.apps.qp.pricelistrebate
    Thanks,
    Mahesh

    Hi Mahesh
    Seems you have not imported OAViewObject Class in your controller..Do the following in the import section of your controller..
    import oracle.apps.fnd.framework.OAViewObject;AJ

  • How to retain the java applet generated code when back button is pressed!!

    I've a jsp page in which i've wirtten the code which specifies the word which i write in the text box, then through the applet i'm showing the word which is written in the text box. It means my applet is running and it show the words which i've written in the text box. Now when i click on submit it goes to the next page and when i click on browser's back button then except the applet generated code everyone retains its values. Is there any way to find it out when it encounter the back button click then applet should be restarted. so in this way without writing the whole application form and in the applet generated code i can submit it again.
    My question is how do i reatin the applet generated code when a click button is being pressed (b'coz for the textbox, textareas everything retains it)
    any suggestions or guidance are most welcome.
    thanks in advance....

    you don't need to navigate explicitly. Just clear the back stack till your specific page and say goback. below is the  code you can use.
     protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
                        e.cancel=true;
                    RemoveBackStackTillSpecificPage("page2.xaml");
                    GoBack();
    public static void RemoveBackStackTillSpecificPage(string pageName)
    PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
    var previousPage = frame.BackStack.FirstOrDefault();
    if (previousPage != null && previousPage.Source != null)
                    while (!previousPage.Source.ToString().Contains(pageName))
                        frame.RemoveBackEntry();
                        previousPage = frame.BackStack.FirstOrDefault();
            public static void GoBack()
                PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
                LastPageUri = frame.Source;
                frame.GoBack();
    Please mark this as answer if this answers your question
    Purushothama V S

  • How to get the index of the clicked button on TOOLBARBUTTONCHOICE

    Hello Experts,
       I have used toolbarbuttonchoice and created the dropdown list of the buttons dynamically. now when any of the button is clicked i need to get the reference of the button to call appropriate code in the action, but i am unable to get the either the reference or index of the clicked button.
    Please help.
    Regards,
    Kinshuk

    Hi Sascha,
      My code goes this way
      data:
        lr_btn_ch   type ref to if_wd_view_element,
        lr_toolbar_btn_choice type ref to cl_wd_toolbar_btn_choice,
        lr_row_data           type ref to cl_wd_row_data,
        item                  type string,
        action                type string.
    CALL METHOD view->get_element
      EXPORTING
        id      = 'BTNCH'   " button choice Element in layout
      receiving
        element = lr_btn_ch
    lr_toolbar_btn_choice ?= lr_btn_ch.
    DATA:  lt_items      type string_table,
        lt_actions    type string_table.
    loop at lt_dyntab into ls_dyntab.
      append ls_dyntab-name to lt_items.
    append 'ONBTNCH' to lt_actions.
    endloop. 
    i get the data in the table lt_dyntab from API not in context
      loop at Lt_items into item.
        read table Lt_actions index sy-tabix into action.
        create_choice_item( i_toolbar_btn_choice = lr_toolbar_btn_choice i_item = item i_action = action i_view = VIEW ).
      endloop.
    create_choice_item creates the menu item for the button choice..
    My question is where should i call the map_on_action method. and how do i retrieve the index or reference in ONBTNCH method.
    please elaborate.
    Regards,
    Kinshuk

  • How to call this out by clicking button from other file??

    The following coding is easy and workable...!! i wonder how do i call this out by clicking button from other file... please help!!
    import java.awt.geom.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.print.PrinterJob;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.print.*;
    public class Receipt extends JPanel implements Printable, ActionListener {
    final static Color bg = Color.white;
    final static Color fg = Color.black;
    final static Color red = Color.red;
    final static Color white = Color.white;
    final static BasicStroke stroke = new BasicStroke(2.0f);
    final static BasicStroke wideStroke = new BasicStroke(8.0f);
    final static float dash1[] = {10.0f};
    final static BasicStroke dashed = new BasicStroke(1.0f,
    BasicStroke.CAP_BUTT,
    BasicStroke.JOIN_MITER,
    10.0f, dash1, 0.0f);
    final static JButton button = new JButton("Print");
    public Receipt() {
         setBackground(bg);
    button.addActionListener(this);
    public void actionPerformed(ActionEvent e) {
    if (e.getSource() instanceof JButton) {  
    PrinterJob printJob = PrinterJob.getPrinterJob();
    printJob.setPrintable(this);
    if (printJob.printDialog()) {
    try {
    printJob.print();
    catch (Exception ex) {
    ex.printStackTrace();
    public void paintComponent(Graphics g) {
         super.paintComponent(g);
         Graphics2D g2 = (Graphics2D) g;
         drawShapes(g2);
    public void drawShapes(Graphics2D g2){
    g2.drawString("Hello world",50,50);
    public int print(Graphics g, PageFormat pf, int pi) throws PrinterException {
    if (pi >= 1) {
    return Printable.NO_SUCH_PAGE;
         drawShapes((Graphics2D) g);
    return Printable.PAGE_EXISTS;
    public static void main(String s[]){
         JFrame f = new JFrame();
         JPanel panel = new JPanel();
         panel.add(button);
         f.getContentPane().add(BorderLayout.SOUTH, panel);
         f.getContentPane().add(BorderLayout.CENTER, new Receipt());
         f.setSize(580, 500);
         f.show();

    The following coding is easy and workable...!! i wonder how do i call
    this out by clicking button from other file... please help!!Copy the code from your main() method and put it into the actionPerformed() method of the other class. If you do not need to reference the instance of Receipt from the othe class, it is that easy.

  • Before the selector value reach a Case structure I need to stop it until a push button is pressed. How to do?

    Before the selector value reach a Case structure I need to stop it until a push button is pressed. How to do?

    altenbach wrote:
    UliB wrote:
    simply wire your selector value through a while loop. Stop the loop with your button. After the loop stops, the value will go on to the case structure.
    Hmmmm.....
    Hello altenbach,
    roflol .
    Thank you for the link to 'A Field Guide To LabVIEW Objects - Selfish Loop'. I'll keep that in mind, when answering other questions with while loops.
    Uli

  • Hi - Re Keynote  I'm trying to figure out how to create a music album on USB flash drive. What I want is a background picture with 'click-buttons' to play each track listed, also similar for embedded videos and photos etc.  Is this possible with Keynote ?

    Hi - Re Keynote  I'm trying to figure out how to create a music album (as an artist) on USB flash drive, (accessible by both Mac and PC). What I want is a background picture with 'click-buttons' to play each track listed, and play in order (like a cd) - also similar for embedded videos and photos etc. This should all be on the one page.  
    Is this possible with Keynote, or any other software package for Mac (am using Macbook Pro) ?
    Gav 88

    Hi there,
    Yikes, it sounds like you've been doing a lot of work on this project... Unfortunately, however, this isn't the Adobe Encore forum, but the Acrobat.com forum. While it seems like an exciting question, we're not able to address issues pertaining to other Adobe products and services. Here's a link to the Adobe Encore forum, where you're more likely to get help for this specific issue:
    http://forums.adobe.com/community/encore
    Sorry not to be of more specific help to you. Best of luck!
    Kind regards,
    Rebecca

  • TS4080 apple thunderbolt display image on display intermittently goes dark, does not wake from sleep after clicking mouse or keyboard, but there is "bonk" sound after clicking mouse or pressing keys. Rebooting by pressing the power button resolves issue.

    My apple thunderbolt display (which I purchased 1.5 years ago; OS 10.7.5 Mac Mini) intermittently goes dark, does not wake from sleep after clicking mouse or keyboard, but there is "bonk" sound after clicking mouse or pressing keys, so am thinking it is a hardware problem with the display. Rebooting by pressing the power button turns the screen back on, but the same phenomenon has occurred several times. Could this be a software issue, or do I need to have my display repaired? Your feedback would be appreciated.

    Hi ED, tough to tell, but it does sound like it's waking with the bonk, just not displaying.
    Long shot but...
    I wonder if it's a variation of this, of which I've seen many different symptoms...
    Resolution
    Move the mouse or trackpad cursor over the center area of the login window so you can see the user icons. Click on the icon of the user that you would like to login as, type in the user's password, and press Return.
    If the login window is configured to show only the name and password fields, type in the user's name and password into the fields, and press Return (even if you cannot see the rest of the login window).
    Additional Information
    This issue will not occur if the display is not sleeping when the account is logged out. Use the steps below to confirm that the account is not configured to log out automatically while the display is sleeping:
        1.    Open System Preferences > Security & Privacy > General.  Click the padlock to unlock the preference pane and enter your admin password. Click the Advanced button at the bottom, then see if the option "Log out after N minutes of inactivity" (where N is the number of minutes) is enabled.
        2.    Open System Preferences > Energy Saver and configure Display Sleep to occur after the account is logged out, by dragging the slider to a number of minutes that is greater than N was set to in the previous step.
    Important: If automatic log out is not needed, disable "Log out after Nminutes of inactivity" in System Preferences > Security & Privacy > General. This will also prevent the issue.
    http://support.apple.com/kb/TS4135?viewlocale=en_US

  • How to easily add roller click buttons to my iweb page?

    How easy is it to add roll over mouse click buttons to my website, using iWeb 09.
    Many thanks.
    Graham

    iWeb only supports rollover text, not images.
    To use images you have to create them first. One for the normal state and one for the hover or rollover state.
    Then you must embed them in iWeb with the HTML Snippet.
    Here's such a page :
    http://www.wyodor.net/_Demo/duckmenu/HoverImages.html
    Instead of two images it uses one that changes position when you hover the mouse over them :
    !http://www.wyodor.net/Demo/duckmenu/duckassets/iWebHome.png!
    Open the Activity window in Safari, Command-Opion-A, to see the other images. Option-double-click the image to save them.
    Also save the webpage and study the code.

  • How to click a HTML page button from Java code?

    Know the HTML page name and the button id in this page, how to click the button automaticly in java code(Like in awt or swing)?

    ukkus wrote:
    Hi,
    Thank for the quick reply,
    It will be very helpful if you can tell me how can we do this, I am not able to get how to do the same, with the link that you have provided.You haven't even had time to read it yet.
    >
    Actually main scenario is:
    I have to RUN a JSP report which will call this script. That JSP report and script is in UNIX server. Can you please explain how to perform this task.Running this from a JSP is an even worse programming practice than running it from a standalone application.

Maybe you are looking for

  • Need help in IDOC...?

    Moved to correct forum, please use a meaningful subject in future Hi Abapers,                 I have created a model view and after generatin partner profile when i am distributing the model i am getting an error: Model view MATNR_NV has not been upd

  • F-44 clear vendor

    Hi, I find a very strange issue in our system, in FBL1N, for one vendor, i can see vendor open items, but in F-44, i just can not select these open item out for this vendor, so can not clear vendor open items, does anybody has met this strange issue

  • Adobe Air Installation Issues

    I am trying to install Adobe Air but keep getting an error that states...  This Application requires a version of Adobe Air which cannot be found. Please download the latest version of the runtime from http://www.adobe.com/go/getair or contact the ap

  • Error when executing the query.

    Hello ,             I have some customer exit variables used in my reports , and when I execute the report I get an error like " My variable name cannot be interpreted as number " The way I declared the variable is of customer exit type and as a Numb

  • J2SDK 1.4.1 Install on Win2K does not install Development Tools

    I've tried installing, re-installing, removing and installing the JDK 1.4.1 and it WILL NOT install the GUI development tools. Any hints or clues as to how to fix this?