Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tab Control Caption Formatting Question

Status
Not open for further replies.

Quintios

Technical User
Mar 7, 2002
482
US
I'd like the font color to change on my tab control in a similar way to the default database box. Currently the font color is black, and I'd like it to turn to blue when you put your mouse over the individual tabs. I've tried various pieces of code but I can't get anything to work. The latest failure looks like this:

Code:
Private Sub pgeTagsByList_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.pgeTagsByList.FontColor = "#A8C8F0"
End Sub

It craps out on "FontColor". I tried using the .Caption.FontColor, but it won't work either.

I did get this code to work:
Code:
Private Sub pgeTagsByList_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.TabCtl0.FontSize = 30
End Sub

But the problem is that the font size won't reset when you move the mouse off the control. It just stays all big. Also, it changes the font size of the entire tab control and not just the one page. I tried using "FontSize" on the page but it gives me the "member not found" message on that code.

Any suggestions? I'm using Access 97, there are six pages on the tab control. Can't think of any other info you'd need...

Thanks!
Onwards,

Q-
 
Without Looking too much at it, you might need to use FORECOLOR instead of FONTCOLOR, but I'm not sure. I too have run into the tab control's lack of "customization" ability, and just recently converted a form with a 7-tab tab-control to a form with embedded subforms that are opened by command buttons instead. In my case, I was able to make each subform EXACTLY the same size, place a 2-point colored border around each, and color the font on the corresponding button the same. So it looks kinda OK - the red button opens the red-bordered subform and so on...

I think, if you want to stick with the tab control, you may have to jerry up some transparent-background command buttons that lay over the actual tab area, and use their properties instead. You'd need to blank out the tab text and use the command button instead, with an appropriate line of code to make the tab-page active.

Jim There are two ways to argue with a woman - neither one works.
Another free Access forum:
More Access stuff at
 
Nope, ForeColor didn't work... Oh well. It's not *that* important. It's not worth the trouble to try to make it that pretty. I ain't making any money off this DB. :)


Onwards,

Q-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top