Tab Control Hidden Buttons

ScrmingWhisprs

I <3 Coffee Milk.
Local time
Today, 11:57
Joined
Jun 29, 2006
Messages
156
Hi all,

I've been trying to search for a solution to this problem, but can't even find any posts by others with this problem.

On some forms I use a tab control with the Style as None so there are no visible tabs or buttons. This way I can re-purpose the form for several different functions. However, if you click where the buttons or tabs would be (if they were visible), the tab control goes to that page. I have my own buttons to get my users to move between the tabs when needed.

I've tried setting the Tab Fixed Width and Height properties to 0, but that does not help. Is there something I'm missing?


-Mike
 
Sounds like you made extra work for yourself. The tabs behave as buttons.
 
Even if they are "hidden"? It doesn't make sense.
 
Just tried to duplicate your situation and couldn't. I set the style to none, the tabs are gone, and no amount of clicking in their previous location triggers them. Can you post a sample db that exhibits the problem? In case it's a version thing, I tested with 2007.
 
Hi pbaldy,

I've tested on versions 2010, 2013 and 2016. The problem occurs on all 3 of those versions. I will try to get a sample together.


-Mike
 
That's okay, I just recreated it in 2010. I was able to get around it by moving the top margin of the tab control to the point where the tabs would normally meet the main tab control.
 
I found that you can reduce the Tab Fixed Width and Tab Fixed Height property down to 0.0007" (1 Twip). It's not likely the user would hit that.

I couldn't find pbaldy's top margin either.
 
Grab the top border where noted and drag it down so the tabs are cut off. With Style set to None you can't see the tabs, but you can still drag the border down to avoid the behavior you have experienced.
 

Attachments

  • TabControl.jpg
    TabControl.jpg
    39.6 KB · Views: 102
I answered a question a few years ago where the user wanted to password protect a tab. The thread is here:- Tab control password You might be able to do something with this code. You could probably grab the current tab index, then grab the clicked tab index, if they are not the same, then prevent the new tab opening. Or... move straight back to the original tab... Either way would work I reckon. You will have to play with the code to find which works best.
 
Grab the top border where noted and drag it down so the tabs are cut off. With Style set to None you can't see the tabs, but you can still drag the border down to avoid the behavior you have experienced.

I pulled it down as far as it would go but that doesn't get rid of them entirely. If you click near the top margin where the buttons were it still switches between tabs.
 
So I used sneuberg's suggestion and changed the Tab's fixed width and height to 0.0007" and that fixed my issue, at least on Access 2013! I have to test on 2010 and 2016 tomorrow.

You would think having it set to 0" would have taken care of it. Gotta love Microsoft!

Thanks again!
-Mike
 

Users who are viewing this thread

Back
Top Bottom