Print Page | Close Window

Tabcontrol help

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=9454
Printed Date: 28 September 2024 at 7:18pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tabcontrol help
Posted By: b4gn0
Subject: Tabcontrol help
Date Posted: 31 January 2008 at 6:26am
Hello all, first of all thank you for the great product you provide!

I wanted to ask this community (and maybe the authors) if there is a way to show something in all the TabControlPages inside a TabControl.

For example a textbox, can i show it inside the tabcontrol and in all pages?

The only solution i found so far was a flat picturebox (with the controls inside) put in the position i wanted the controls to be showed in all the tabs. But it doesn't support transparency. So the result is bad.

Thank you for your time,
Alex



Replies:
Posted By: Oleg
Date Posted: 31 January 2008 at 11:24am
No, sorry, where is no way.

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


Posted By: ijwelch
Date Posted: 31 January 2008 at 9:29pm
Beg to differ:)

Place the controls you want on the first tab. Then in the BeforeItemClick event get hWnd of the TabControlPage for the Item parameter. Then call SetParent API for the controls to move them. Like this:

Private Declare Function SetParent _
                Lib "user32" (ByVal hWndChild As Long, _
                              ByVal hWndNewParent As Long) As Long


Private Sub Tab1_BeforeItemClick(ByVal Item As XtremeSuiteControls.ITabControlItem, _
                                 Cancel As Variant)

   Dim hParent As Long

   Select Case Item.Index
       Case 0
           hParent = TabControlPage1.hWnd
       Case 1
           hParent = TabControlPage2.hWnd
       Case 2
           hParent = TabControlPage3.hWnd
   End Select

   SetParent fraDailyFrequency.hWnd, hParent
   SetParent fraDuration.hWnd, hParent
End Sub



Posted By: corpcon
Date Posted: 04 February 2008 at 1:03am
If I understand correctly, you are looking for a complicated solution to a very simple problem.
 
I do this all the time with buttons (such as Close, Help, etc). Just place the control on the form (not on the tab control) and bring the control to the front (or set ZOrder 0 in code).


Posted By: b4gn0
Date Posted: 04 February 2008 at 3:07am
Originally posted by corpcon corpcon wrote:

If I understand correctly, you are looking for a complicated solution to a very simple problem.
 
I do this all the time with buttons (such as Close, Help, etc). Just place the control on the form (not on the tab control) and bring the control to the front (or set ZOrder 0 in code).


What if the controls i want to show are on the top of the tab control?

I'll try member_profile.asp?PF=2113&FID=23 - ijwelch 's solution and let you know. Any further help is appreciated.

Thanks for your time guys!

-Alex


Edit: It worked for me, thank you member_profile.asp?PF=2113&FID=23 - ijwelch !



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