Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - Request: TabControlPage Border
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Request: TabControlPage Border

 Post Reply Post Reply
Author
Message
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Topic: Request: TabControlPage Border
    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

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
tobi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 September 2004
Location: Germany
Status: Offline
Points: 451
Post Options Post Options   Thanks (0) Thanks(0)   Quote tobi Quote  Post ReplyReply Direct Link To This Post Posted: 22 March 2009 at 6:55am
Hi jpbro,

how did you do that ? Looks really cool !
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 22 March 2009 at 10:19am
Here's the sample project:

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

Back to Top
tobi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 September 2004
Location: Germany
Status: Offline
Points: 451
Post Options Post Options   Thanks (0) Thanks(0)   Quote tobi Quote  Post ReplyReply Direct Link To This Post Posted: 22 March 2009 at 10:24am
Hi jpbro,

thanks for your sample ! It works and is really cool !
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.