Problem with tabbing and option buttons

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Edward

    Problem with tabbing and option buttons

    I have a data entry form that allows the user to navigate around
    entirely using the keyboard. However, it contains various option
    button controls which are in the tab order. Whenever they are "hit"
    in the tab order, they are immediately "pressed" (e.g. they go from
    Unchecked to Checked) Is there any way of suppressing this action
    while still keeping them in the tab order?

    TIA

    Edward
    --
    The reading group's reading group:

  • Raoul Watson

    #2
    Re: Problem with tabbing and option buttons


    "Edward" <teddysnips@hot mail.com> wrote in message
    news:25080b60.0 310310423.27552 f4c@posting.goo gle.com...[color=blue]
    > I have a data entry form that allows the user to navigate around
    > entirely using the keyboard. However, it contains various option
    > button controls which are in the tab order. Whenever they are "hit"
    > in the tab order, they are immediately "pressed" (e.g. they go from
    > Unchecked to Checked) Is there any way of suppressing this action
    > while still keeping them in the tab order?
    >[/color]

    First of all, you should grou your option buttons using a frame. This way,
    you don't have to do any coding to ensure that only one option button is
    selected.

    The grouped option button behaves correctly as per the standard user
    interface. As you enter, the first option (radio) button is selected. Within
    the group you would use the up and down arrow keys to move the selection and
    the mark. Then use TAB to move out of the group. This need to be done
    because you cannot leave a group of option button with nothing selected. The
    way you want to do it it would make it possible (which would violate user
    interface). If you want to allow none or all, you should use check boxes.


    Comment

    • Edward

      #3
      Re: Problem with tabbing and option buttons

      "Raoul Watson" <WatsonR@Intell igenCIA.com> wrote in message news:<eBCob.210 66$Q9.5904@nwrd dc02.gnilink.ne t>...[color=blue]
      > "Edward" <teddysnips@hot mail.com> wrote in message
      > news:25080b60.0 310310423.27552 f4c@posting.goo gle.com...[color=green]
      > > I have a data entry form that allows the user to navigate around
      > > entirely using the keyboard. However, it contains various option
      > > button controls which are in the tab order. Whenever they are "hit"
      > > in the tab order, they are immediately "pressed" (e.g. they go from
      > > Unchecked to Checked) Is there any way of suppressing this action
      > > while still keeping them in the tab order?
      > >[/color]
      >
      > First of all, you should grou your option buttons using a frame. This way,
      > you don't have to do any coding to ensure that only one option button is
      > selected.
      >
      > The grouped option button behaves correctly as per the standard user
      > interface. As you enter, the first option (radio) button is selected. Within
      > the group you would use the up and down arrow keys to move the selection and
      > the mark. Then use TAB to move out of the group. This need to be done
      > because you cannot leave a group of option button with nothing selected. The
      > way you want to do it it would make it possible (which would violate user
      > interface). If you want to allow none or all, you should use check boxes.[/color]

      Thanks for this. The form is by now far too complex to be reworked in
      the way that you suggest. However, within the terms of reference of
      my application, you are wrong when you suggest that "If you want to
      allow none or all, you should use check boxes". My application is
      designed to capture survey data, and no entry is marked down as no
      answer. Although I suppose I could add an extra option button for
      just that contingency, though we are seriously running out of screen
      real estate.

      Edward
      --
      The reading group's reading group:

      Comment

      • J French

        #4
        Re: Problem with tabbing and option buttons

        On 1 Nov 2003 08:30:44 -0800, teddysnips@hotm ail.com (Edward) wrote:
        <snip>[color=blue]
        >
        >Thanks for this. The form is by now far too complex to be reworked in
        >the way that you suggest.[/color]

        In that case it is about time you ripped the App apart and rebuilt it
        [color=blue]
        >However, within the terms of reference of
        >my application, you are wrong when you suggest that "If you want to
        >allow none or all, you should use check boxes".[/color]

        Actually, I think he is right
        - your problem is the peculiar behaviour of 'grouped' option buttons
        - check boxes do not behave in that perverse manner

        - however personally I would use a UserControl ...
        [color=blue]
        >My application is
        >designed to capture survey data, and no entry is marked down as no
        >answer. Although I suppose I could add an extra option button for
        >just that contingency, though we are seriously running out of screen
        >real estate.[/color]

        The 'no answer' bit is not relevant to your problem
        - and I don't think Raoul was suggesting that it would help
        - that is just an explanation of the perverse behaviour of grouped
        option buttons (and frankly I don't think it is quite correct - it is
        actually down to the Arrow keys - and sadly windows nicks them before
        the KeyDown event )

        If you are running out of 'screen real estate' then you need to have a
        major re-think

        Also, if you want to add a question, and you have to touch the source
        code, you are skating on thin ice.

        Your Form should contain just one Control Array of the very
        peculiar/specific input types that you have created
        - ideally driven from a parameter file

        Look into UserControls, and have a look at some of the more
        interesting Windows APIs - DrawFrameContro l comes to mind


        Comment

        Working...