473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Themed Tab Control work-around

It seems that the only way to make themed AND classic Windows GUIs look okay
with tab controls and subforms, due to the color issue, is to place a one
page-no button tab control on each subform that will be displayed as part of
a main form's tab control, completely covering the subform's detail, and
then pasting all the controls onto it. However, this is major cosmetic
surgery.

1. Is there some secret way to re-attach event procedures to controls after
cutting from a form and pasting on a tab control?

2. How much overhead will 16 extra tab controls on 16 subforms create, and
will it matter on a fast machine?

--
Darryl Kerkeslager

Power corrupts.
Absolute power corrupts absolutely.
Knowledge is power.
See www.adcritic.com/interactive/view.php?id=5927
Nov 13 '05 #1
2 2065
A1. Not really.
In A2003, you could try cutting all the text from the form's module, and
pasting it back in. You may find that Access enters the [Event Procedure]
for you beside the appropriate properties. (MZTools claims to do
cut'n'paste-with-event-procedures, but I haven't verified that. Download
from www.mztools.com.)

A2. 16 subforms
If you don't need all these loaded at once, another option is to place a tab
control on a form, and make it not very tall (<1 inch.) Below the tab
control, add a single subform control so it sits directly on the form. Use
the tab control's Change event to load the desired subform into the single
generic subform control. Example below. The form loads very fast (one one
subform), and it's very memory efficient.

You may find you have to set the LinkMasterFields and LinkChildFields after
changing the SourceObject, as Access is likely to set these to whatever if
feels like.

Private Sub tabMain_Change()
On Error GoTo Err_tabMain_Change
Dim prp As Property

Set prp = Me.frmsubGeneric.Properties("SourceObject")

Select Case Me.tabMain.Value
Case Me.pgeUnit.PageIndex
prp = "frmUnit"
Case Me.pgeVehicleType.PageIndex
prp = "frmVehicleType"
Case Else
MsgBox "I don't know what to do with tab " & Me.tabMain.Value & "."
End Select

Exit_tabMain_Change:
Set prp = Nothing
Exit Sub

Err_tabMain_Change:
MsgBox "Error " & Err.Number & " - " & Err.Description
Resume Exit_tabMain_Change
End Sub
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Darryl Kerkeslager" <ke*********@comcast.net> wrote in message
news:sd********************@comcast.com...
It seems that the only way to make themed AND classic Windows GUIs look
okay with tab controls and subforms, due to the color issue, is to place a
one page-no button tab control on each subform that will be displayed as
part of a main form's tab control, completely covering the subform's
detail, and then pasting all the controls onto it. However, this is major
cosmetic surgery.

1. Is there some secret way to re-attach event procedures to controls
after cutting from a form and pasting on a tab control?

2. How much overhead will 16 extra tab controls on 16 subforms create, and
will it matter on a fast machine?

Nov 13 '05 #2
"Allen Browne" <Al*********@SeeSig.Invalid> wrote
A2. 16 subforms
If you don't need all these loaded at once, another option is to place a
tab control on a form, and make it not very tall (<1 inch.) Below the tab
control, add a single subform control so it sits directly on the form. Use
the tab control's Change event to load the desired subform into the single
generic subform control. Example below. The form loads very fast (one one
subform), and it's very memory efficient.


Hmmmmm ... wish I had known this six months ago. This would be more like a
sex change than "cosmetic surgery". Still, it may be worth it.

Thanks

--
Darryl Kerkeslager

Power corrupts.
Absolute power corrupts absolutely.
Knowledge is power.
See www.adcritic.com/interactive/view.php?id=5927

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tom | last post by:
Hi friends my question is is it possible to export the xp theme so that even when app is eventually deployed on win98 or 2000 the UI will be consistent to that of XP ? Thanks Tom
3
by: Tim Marshall | last post by:
I would swear that when I developed in A97, I could change the back colour of a form. However, in Windows XP, on both A97 and A2003, there no longer is a property showing in the format tab for...
0
by: Wayne | last post by:
I've been to the MS website but can't find a resolution to either of the following. When using themed controls, command buttons have a one pixel light colored dot just outside each corner. It is...
3
by: MattGood | last post by:
Hi! I can't show a ascx-control in a correct manner when the ascx-control uses another ascx-control, the IsPostBack and ViewState's etc. don't seems to work, problably because there can only be...
6
by: Terry Olsen | last post by:
I decided to use a tab control for my latest project. On Windows XP, the tab control itself is themed (tabs are themed), but the tab pages and any controls I put on them are not themed (except for...
5
by: samuelberthelot | last post by:
Hi, I get this exception when I use a themed css file. In my web.config file I have: <pages theme="dRise"> and the trouble page is a master page : <% Response.Write(Header)%> <form...
1
by: Trapulo | last post by:
Hello, I've this problem. I need to create a web app, where some text are localized in many languages. That's ok: I can use "App_Localresources" and related features, and all works. Now, I need...
0
by: Tim Marshall | last post by:
A2003. I rather like the appearance I get with windows themed controls turned on, but I'm running into an odd problem with tab controls. When I set the back style to transparent, it really isn't...
0
by: =?Utf-8?B?UGF0cmljayBG?= | last post by:
Hello, problem is simple. I have a website with atm 2 themes. Now i have both themes placed in diffrent directories in the asp.net Themes folder Themes -Red --CSS --Images -Blue --CSS
0
by: Wayne | last post by:
This is probably trivial, but annoying just the same. Has anyone noticed in Access 2003 when using themed controls that the mouseover color fringing does not seem to work properly on command...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.