Print Page | Close Window

Request: TabControlPage Border

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=13752
Printed Date: 22 November 2024 at 7:15pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Request: TabControlPage Border
Posted By: jpbro
Subject: Request: TabControlPage Border
Date Posted: 21 March 2009 at 6:04pm
I would like to be able to add a border to the TabControlPage control (ideally, I could set it to Office2007 style which would paint it in the correct color). Bonus points if the border could have rounded corners (to match the TabControl in Office 2007 mode) with the area outside the rounded corner transparent and the inside portion set to a color (for example, vbWindowBackground).



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6




Replies:
Posted By: jpbro
Date Posted: 21 March 2009 at 6:14pm
Something like this:




-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: tobi
Date Posted: 22 March 2009 at 6:55am
Hi jpbro,

how did you do that ? Looks really cool !


Posted By: jpbro
Date Posted: 22 March 2009 at 10:03am
Hi tobi,

I'm using the TabControl with the Office 2007 appearance to hold the wizard steps, but I'm only showing 1 tab (step) at a time. I put a GroupBox control with the Back, Next and Cancel/End buttons on the first tab, then when the user changes steps (i.e. tab pages), I use the SetParent API to move the GroupBox to the current TabControlPage.

I'll see if I can strip out some of the code from my current test project (it uses 3rd party libraries for some functions) and upload an example project for you to examine.


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: jpbro
Date Posted: 22 March 2009 at 10:19am
Here's the sample project:

uploads/20090322_101743_WizardSkeleton.zip - uploads/20090322_101743_WizardSkeleton.zip

I think I pulled everything out that wouldn't work on other computers, but if the sample isn't working, just get back to me and I will fix it.

Note that mine doesn't look as nice as the sample screenshot (above), because we can't set a border for the TabControlPage.



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: tobi
Date Posted: 22 March 2009 at 10:24am
Hi jpbro,

thanks for your sample ! It works and is really cool !


Posted By: jpbro
Date Posted: 22 March 2009 at 10:48am
No problem tobi, hope you find it useful!

-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: jpbro
Date Posted: 22 March 2009 at 11:01am
I had an idea that I could simulate the TabControlPage border by putting a Transparent TabControlPage on the TabControl, and then putting a transparent MarkupLabel on the TabControlPage. The MarkupLabel would have a Border object with corner radius and background color as required. Unfortunately, I experienced some problems:

1) The MarkupLabel isn't a container control, so regular labels and other lightweight controls get covered by it. Can the MarkupLabel be made into a container control? I think it would be useful in a number of cases, where you want to use Markup for a background but have other controls on top of it (including lightweight controls).
2) The MarkupLabel transparency seems to be grabbing the TabControl background bitmap incorrectly. See this screenshot:




Notice the light border arund the top and the dark border around the bottom of the MarkupLabel border. These seem to be getting sucked out of the edges of the TabControl instead of where the MarkupLabel is actually positioned over.

3) There doesn't seem to be any colours in the PaintManager.ColorSet to match the border of the TabControl with Office2007 appearance, so the closest that I got was that grey color (shown above). I see properties like TabExcelNormalLeftInnerBorder and TabPropertyPage2003BorderLeftHighlight, so can the equivalent TabOffice2007* colors be added?

Here's a sample project:

uploads/20090322_105556_WizardSkeleton.zip - uploads/20090322_105556_WizardSkeleton.zip

So:

1) Can the MarkupLabel control be turned into a container?
2) Can the transparency issue of the MarkupLable on a transparent TabControlPage be fixed?
3) If #2 is impossible, how about adding borders including color and outside transparency) to the TabControlPage?
4) Can the TabOffice2007* color properties be added to the TabControl.PaintManager.ColorSet object?

Thanks.



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Oleg
Date Posted: 23 March 2009 at 2:10am
Hi,
 
Problem in TabControlPage and Margins you set to 5. To fix border thing - revert Margins to 0 and Move Label to 5 pixels instead.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: jpbro
Date Posted: 23 March 2009 at 10:28am
Thanks Oleg, that solves question #2. How about these (in particular #1 and #4):

1) Can the MarkupLabel control be turned into a container?
2) Can the transparency issue of the MarkupLable on a transparent TabControlPage be fixed?
3) If #2 is impossible, how about adding borders including color and outside transparency) to the TabControlPage?
4) Can the TabOffice2007* color properties be added to the TabControl.PaintManager.ColorSet object?

Otherwise solving #2 doesn't matter much since I still can't get the proper result.


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net