Alpha Video Training
Results 1 to 6 of 6

Thread: Need direction with Alt-Space & Space Key

  1. #1
    Member
    Real Name
    Paul STClair
    Join Date
    Sep 2000
    Location
    Auburn, Maine
    Posts
    11

    Default Need direction with Alt-Space & Space Key

    Hi to all,

    I am also new to Alpha5 v4; I have been using Alpha4 v6; but have
    finally thrown in the towel and moving up.

    I am trying to get a handle on all the different options and Murphy
    proof user options before getting too far into changeover:

    I need help with disabling the Alt-Space option that allows the
    dialog box to pop up and also with redirecting the space key to only
    work as a space key, rather than also going back to the previous form.

    Thanks

    Paul

  2. #2
    "Certified" Alphaholic
    Real Name
    Finian Lennon
    Join Date
    Apr 2000
    Location
    Atlanta, GA
    Posts
    1,805

    Default RE: Need direction with Alt-Space & Space Key

    I suppose you could play around with the OnKey event to try to capture the Alt-Spacebar.

    It seems to me that the "Exit" option is the only one of the Alt-Spacebar options that you would really want to stop from happening. (You do allow the user to minimize and restore, I assume.) That being the case you can prevent the "X" (from the system menu) or "Close" (from Alt-Spacebar) from shutting the form by putting a Cancel() in the CanExit event of the form. You can remove the system menu by changing the options under Form/Properties/Window. This forces the user to close the form with a button of your own design.

    I can't get my spacebar to do any more than enter a space in my forms so I'm not sure about that one.

    Finian

  3. #3
    Member
    Real Name
    Paul STClair
    Join Date
    Sep 2000
    Location
    Auburn, Maine
    Posts
    11

    Default RE: Need direction with Alt-Space & Space Key

    Hi Finian,

    Thanks for your response; The On Key to disable the Alt-Space command
    is what I'm trying to come up with. I have been able to control the
    other keys that way, but not having luck with Alt-Space. I am trying
    to build a foundation form to keep the users with minimum chances for
    confusion and then work backwards to give different users what they
    need depending on what they will be doing in their job function. Once
    I get the foundation form under control, then I want to copy & modify
    to simplify for future designs.

    As far as the space key changing to different forms; This seems to
    be a weird function and may be a creation from something else I have
    done. I tried removing my onkey scripts with the same action. I have
    only set up a menu form and two data entry forms from the menu. When
    I push the Space Key in non-enter mode, it takes me to the previous
    form.

    Thanks
    Paul

  4. #4
    "Certified" Alphaholic
    Real Name
    Finian Lennon
    Join Date
    Apr 2000
    Location
    Atlanta, GA
    Posts
    1,805

    Default RE: Need direction with Alt-Space & Space Key

    It would be a lot simpler to simply "Cancel()" any attempt to close the form other than from your close button.

    If you make sure to activate an object on your form when the form starts you may be able to avoid the other problem.

    Finian

  5. #5
    Member
    Real Name
    Paul STClair
    Join Date
    Sep 2000
    Location
    Auburn, Maine
    Posts
    11

    Default RE: Need direction with Alt-Space & Space Key

    Hi Finian & others with comments,

    I have solved my Alt-Space dilema with the following On Key;

    if a_user.key.value = "{% }"
    a_user.key.handled=.t.
    end if


    My second problem can be partly solved by the following;

    if this.mode_get()="VIEW" then
    if a_user.key.event="down" then
    if upper(a_user.key.value)=" " then
    a_user.key.handled=.t.
    end if
    end if
    end if


    I was hoping for better results; the space key no longer jumps to the previous
    form when pushed in "View" which is great, but when in "Change" the space key
    only works after some other character has been used in a field. It works fine
    in "Enter" mode.

    I think your option of giving focus to something else on form call may be another
    solution, but I am not sure how to do it.

    Thanks

    Regards,
    Paul

  6. #6
    "Certified" Alphaholic
    Real Name
    Finian Lennon
    Join Date
    Apr 2000
    Location
    Atlanta, GA
    Posts
    1,805

    Default RE: Need direction with Alt-Space & Space Key

    "I think your option of giving focus to something else on form call may be another solution, but I am not sure how to do it."

    Suppose the first field on your form is the ID field and the field object name (Object/Properties/Name) is also ID; then in the OnInit event for the form put these two lines

    this:id.activate()
    this:is.refresh()

    This assures that the cursor will be flashing in the id box when the form starts.

    In general, this should be unnecessary. If the Tab order for the form is set up so that a field object is the first object in the tab order then that will be activated automatically. (Check under Arrange/Set Tab Order) However, if a button or other object is first, you might get this thing with the spacebar.

    Finian

Similar Threads

  1. Buffer Space
    By Phil Rolf in forum Web Application Server v6
    Replies: 1
    Last Post: 08-16-2005, 07:55 AM
  2. space problem
    By Romy Huang in forum Alpha Five Version 5
    Replies: 5
    Last Post: 12-30-2004, 05:02 AM
  3. Space Bar
    By LEGRAN in forum Alpha Five Version 5
    Replies: 2
    Last Post: 05-27-2003, 05:50 PM
  4. White space
    By Leroy Adamski in forum Alpha Five Version 4
    Replies: 4
    Last Post: 07-31-2002, 12:31 PM
  5. Lost in Space
    By Keith Hubert in forum Alpha Five Version 4
    Replies: 2
    Last Post: 08-06-2001, 05:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •