Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Activate text buttons with hot-key

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Activate text buttons with hot-key

    I have a custom toolbar on a form. The buttons on this toolbar are text buttons that execute predefined actions (e.g. "Add New Record". How can I get this button pushed using a hot-key (e.g. Ctrl-A), instead of having the user click on it with the mouse? This functionality exists in the A5 program itself. For example, on the system toolbar, Alt-F produces the same effect as clicking on "File" (the "F" is underscored).
    How can I get the same functionality for the text buttons on my custom toolbar?
    I could find nothing about how to do this in any of the help files, and nothing in past messages on the board.

    #2
    RE: Activate text buttons with hot-key

    Haven't done what you are attempting. Suggest you investigate the OnKey event for your form, after first verifying that the usual accelerator key approach (used for buttons) fails to work. -- t

    Comment


      #3
      RE: Activate text buttons with hot-key

      It is possible to invoke a toolbar action with a "hot key" even if the toolbar action doesn't already have a hot key defined. The normal method is to use the OnKey event and specify the action you want.

      However, it is possible to "push" a toolbar event (button) and have the toolbar code set the action. The method isn't obvious, and requires some xbasic. Any Alpha toolbar is just a modeless xdialog. Using the xdialog functions, you can force any event in the xdialog (toolbar). There are a number of steps to the process.

      1. Get the toolbar name. The easiest method is to undock the toolar and get the name from the title. Typically, a form toolbar will be named "form View"

      2. Open the toolbar in the toolbar editor

      3. On the toolbar appearance tab, clicck the little checkbox at the bottom to display the xbasic tab

      4. The xbasic tab show the xdialog code. What you are looking for is the event you want to invoke or "push". This is the text after a ! on a line. For example, if you open the "invoice" toolbar for AlphaSports, one line has this code.

      "%B=System;T=Browse View (F8);I=$a5_browse;%!command:SYSTEM_BROWSEVIEW?topparent.restrict_browse=.f."

      This line is a button command that opens the browse view form the form. The event code text is

      !command:SYSTEM_BROWSEVIEW

      5. Now you can build the correct OnKey code to "push" the Browse View "button" on the toolbar using

      ui_dlg_event()

      to force the event. Here is the code for the AlphaSports Invoice form OnKey event to open the browse view using F2

      IF a_user.key.value = "{F2}"
      a_user.key.handled = .T.
      IF a_user.key.event = "down" THEN
      if ui_modeless_dlg_exist("Form View")
      ui_dlg_event("Form View","command:SYSTEM_BROWSEVIEW",.t.)
      end if
      END IF
      END IF

      This method requires some knowledge of xbasic and xdialog and the various commands. But it is a slick way to create your own hotkeys for a toolbar.

      Jerry







      Comment


        #4
        RE: Activate text buttons with hot-key

        Tom & Jerry,
        Thanks for your replies. I got the hot-key to work.
        I have a custom toolbar on my form. One of the text buttons
        on that toolbar says "Add Record". I am able to push that
        button with the hot-key (Ctrl-A). However, I can't figure
        out a way to have the "A" in "Add Record" be underscored,
        so that the user knows that Ctrl-A is the hot-key for that
        button.
        I searched past messages and got the hint that, in order to
        accomplish this underscoring, I need to put an "&" in front
        of the "A" in the text box in the toolbar editor, and that
        this will result in the "A" being underscored when
        it is on the text button of my custom toolbar. However, this
        does not do the job. So I must be putting the "&" in the
        wrong place.
        I have included a screenshot of my toolbar editor in order
        to show where I put the "&". It is right in front of the
        "A" in the "Add Record" entry in the Text line of the
        Button Definition column.

        BTW, I am using the Home Edition of A5V5.

        Comment


          #5
          RE: Activate text buttons with hot-key

          Dale

          Accelerator keys using & only works for menus, not toolbars. If you have a need for the accelerator display, use a menu instead of a toolbar. A rule of thumb (one we all break from time to time) is to use menus for text and toolbars for graphics.

          Jerry

          Comment

          Working...
          X