Connecting Tech Pros Worldwide Help | Site Map

Tabbed form question.

Ron
Guest
 
Posts: n/a
#1: Apr 11 '06
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
Guest
 
Posts: n/a
#2: Apr 11 '06

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.TabControlName.Value = 2

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


Ron
Guest
 
Posts: n/a
#3: Apr 12 '06

re: Tabbed form question.



"Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
news:1RR_f.10218$4L1.962@newssvr11.news.prodigy.co m...[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.TabControlName.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


Rick Brandt
Guest
 
Posts: n/a
#4: Apr 12 '06

re: Tabbed form question.


Ron wrote:[color=blue]
> "Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
> news:1RR_f.10218$4L1.962@newssvr11.news.prodigy.co m...[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.TabControlName.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




Ron
Guest
 
Posts: n/a
#5: Apr 12 '06

re: Tabbed form question.



"Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
news:Kxb%f.67917$Jd.36968@newssvr25.news.prodigy.n et...[color=blue]
> Ron wrote:[color=green]
>> "Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
>> news:1RR_f.10218$4L1.962@newssvr11.news.prodigy.co m...[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.TabControlName.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


Closed Thread