Tabbed form question.

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

    #1

    Tabbed form question.

    Hi all,

    Is there any way to make a particular tab have the focus without actually
    clicking on it? I know there's a On Mouse Move, but if I put in code to
    have that specific tab receive the focus when the mouse moves over the name,
    then moving the mouse anywhere on that entire tab (not just it's name) makes
    the screen flicker. I'm assuming it's making that tab the active one with
    every move and that's causing the screen flicker.

    Do I HAVE to force the user to "click" on the tab or is there another way?

    TIA
    ron


  • Rick Brandt

    #2
    Re: Tabbed form question.

    Ron wrote:[color=blue]
    > Hi all,
    >
    > Is there any way to make a particular tab have the focus without
    > actually clicking on it? I know there's a On Mouse Move, but if I
    > put in code to have that specific tab receive the focus when the
    > mouse moves over the name, then moving the mouse anywhere on that
    > entire tab (not just it's name) makes the screen flicker. I'm
    > assuming it's making that tab the active one with every move and
    > that's causing the screen flicker.
    > Do I HAVE to force the user to "click" on the tab or is there another
    > way?
    > TIA
    > ron[/color]

    If you programatically set focus to any control on a particular TabPage then
    that TabPage will be brought to the front. Alternatively, you can set the
    TabControl's value property to the index of the page you want (they start at
    zero). The line below sets the TabControl to the third page.

    Me.TabControlNa me.Value = 2

    --
    Rick Brandt, Microsoft Access MVP
    Email (as appropriate) to...
    RBrandt at Hunter dot com


    Comment

    • Ron

      #3
      Re: Tabbed form question.


      "Rick Brandt" <rickbrandt2@ho tmail.com> wrote in message
      news:1RR_f.1021 8$4L1.962@newss vr11.news.prodi gy.com...[color=blue]
      > Ron wrote:[color=green]
      >> Hi all,
      >>
      >> Is there any way to make a particular tab have the focus without
      >> actually clicking on it? I know there's a On Mouse Move, but if I
      >> put in code to have that specific tab receive the focus when the
      >> mouse moves over the name, then moving the mouse anywhere on that
      >> entire tab (not just it's name) makes the screen flicker. I'm
      >> assuming it's making that tab the active one with every move and
      >> that's causing the screen flicker.
      >> Do I HAVE to force the user to "click" on the tab or is there another
      >> way?
      >> TIA
      >> ron[/color]
      >
      > If you programatically set focus to any control on a particular TabPage
      > then that TabPage will be brought to the front. Alternatively, you can
      > set the TabControl's value property to the index of the page you want
      > (they start at zero). The line below sets the TabControl to the third
      > page.
      >
      > Me.TabControlNa me.Value = 2
      >
      > --
      > Rick Brandt, Microsoft Access MVP
      > Email (as appropriate) to...
      > RBrandt at Hunter dot com
      >
      >[/color]
      Thanks for the attempt at helping, but I don't see how this answers my
      question.

      Again, is there a way to allow the user to simply pass over the tabcontrol
      and have it change the page to that tab? Similar to the way the ControlTip
      Text is displayed without having to click on the tab (it appears after a
      moment if the pointer is left on the tab rather than having to click it for
      it to appear). Similar to the way all the selections appear on a toolbar
      once the first one is clicked and you move across the toolbar to the other
      selections.

      ron


      Comment

      • Rick Brandt

        #4
        Re: Tabbed form question.

        Ron wrote:[color=blue]
        > "Rick Brandt" <rickbrandt2@ho tmail.com> wrote in message
        > news:1RR_f.1021 8$4L1.962@newss vr11.news.prodi gy.com...[color=green]
        >> Ron wrote:[color=darkred]
        >>> Hi all,
        >>>
        >>> Is there any way to make a particular tab have the focus without
        >>> actually clicking on it? I know there's a On Mouse Move, but if I
        >>> put in code to have that specific tab receive the focus when the
        >>> mouse moves over the name, then moving the mouse anywhere on that
        >>> entire tab (not just it's name) makes the screen flicker. I'm
        >>> assuming it's making that tab the active one with every move and
        >>> that's causing the screen flicker.
        >>> Do I HAVE to force the user to "click" on the tab or is there
        >>> another way?
        >>> TIA
        >>> ron[/color]
        >>
        >> If you programatically set focus to any control on a particular
        >> TabPage then that TabPage will be brought to the front. Alternatively,
        >> you can set the TabControl's value property to the
        >> index of the page you want (they start at zero). The line below
        >> sets the TabControl to the third page.
        >>
        >> Me.TabControlNa me.Value = 2
        >>
        >> --
        >> Rick Brandt, Microsoft Access MVP
        >> Email (as appropriate) to...
        >> RBrandt at Hunter dot com
        >>
        >>[/color]
        > Thanks for the attempt at helping, but I don't see how this answers my
        > question.[/color]

        Sorry, I thought the *core* question was...
        [color=blue]
        > Is there any way to make a particular tab have the focus without
        > actually clicking on it?[/color]

        ....which is what I answered. I have no idea how to do the "hover over it
        and change tabs" thing. All Access has is MouseMove which is not nearly as
        nice to use as the MouseOver events that other environments have.

        You could set TabStyle to None, provide your own labels or buttons for
        changing the page using the methods I mentioned, and then use the MouseMove
        event of those labels/buttons. The actual "tab" portion of a TabPage is not
        a separate object that you can interact with (other than with the mouse).



        --
        Rick Brandt, Microsoft Access MVP
        Email (as appropriate) to...
        RBrandt at Hunter dot com




        Comment

        • Ron

          #5
          Re: Tabbed form question.


          "Rick Brandt" <rickbrandt2@ho tmail.com> wrote in message
          news:Kxb%f.6791 7$Jd.36968@news svr25.news.prod igy.net...[color=blue]
          > Ron wrote:[color=green]
          >> "Rick Brandt" <rickbrandt2@ho tmail.com> wrote in message
          >> news:1RR_f.1021 8$4L1.962@newss vr11.news.prodi gy.com...[color=darkred]
          >>> Ron wrote:
          >>>> Hi all,
          >>>>
          >>>> Is there any way to make a particular tab have the focus without
          >>>> actually clicking on it? I know there's a On Mouse Move, but if I
          >>>> put in code to have that specific tab receive the focus when the
          >>>> mouse moves over the name, then moving the mouse anywhere on that
          >>>> entire tab (not just it's name) makes the screen flicker. I'm
          >>>> assuming it's making that tab the active one with every move and
          >>>> that's causing the screen flicker.
          >>>> Do I HAVE to force the user to "click" on the tab or is there
          >>>> another way?
          >>>> TIA
          >>>> ron
          >>>
          >>> If you programatically set focus to any control on a particular
          >>> TabPage then that TabPage will be brought to the front. Alternatively,
          >>> you can set the TabControl's value property to the
          >>> index of the page you want (they start at zero). The line below
          >>> sets the TabControl to the third page.
          >>>
          >>> Me.TabControlNa me.Value = 2
          >>>
          >>> --
          >>> Rick Brandt, Microsoft Access MVP
          >>> Email (as appropriate) to...
          >>> RBrandt at Hunter dot com
          >>>
          >>>[/color]
          >> Thanks for the attempt at helping, but I don't see how this answers my
          >> question.[/color]
          >
          > Sorry, I thought the *core* question was...
          >[color=green]
          >> Is there any way to make a particular tab have the focus without
          >> actually clicking on it?[/color]
          >
          > ...which is what I answered. I have no idea how to do the "hover over it
          > and change tabs" thing. All Access has is MouseMove which is not nearly
          > as nice to use as the MouseOver events that other environments have.
          >
          > You could set TabStyle to None, provide your own labels or buttons for
          > changing the page using the methods I mentioned, and then use the
          > MouseMove event of those labels/buttons. The actual "tab" portion of a
          > TabPage is not a separate object that you can interact with (other than
          > with the mouse).
          >
          >
          >
          > --
          > Rick Brandt, Microsoft Access MVP
          > Email (as appropriate) to...
          > RBrandt at Hunter dot com
          >[/color]
          Hi Rick,

          That last suggestion did the trick. I even added changes in backcolor and
          raised/sunken special effects to mimic the tab controls. I left the
          original size of my tabcontrol page the same and set the tabstyle to none
          and to modify all the stuff on the different tabpages all I have to do is
          just move my new labels out of the way, put the tabstyle back to buttons and
          there they are. Great! Strange, how I can add that type of functionality to
          labels and Microsoft gives us this very crippled tabcontrol that doesn't
          even work like the rest of their controls (toolbars, etc).

          Anyway, works like a charm so off I go finding my next user friendly
          attribute I want to add.

          Thanks bunches!
          ron


          Comment

          Working...