place frames in TabStrip

The place for threads about TimoSoft TabStrip.
Post Reply
Andreas Vogt
Cadet
Posts: 5
Joined: 04 Oct 2013, 20:13

place frames in TabStrip

Post by Andreas Vogt »

Hi,
is there a sample how to place a frame on the tabstrip? I created a Frame for each Tab.
Andreas
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: place frames in TabStrip

Post by TiKu »

Hi,

The TabStrip is a control container, i.e. you can place controls inside it like you can do with a PictureBox or Frame.
So, at first make sure that you place the frames inside the TabStrip and not just on top of it. Then you can connect each tab page with the frame window by using the hAssociatedWindow property:

Code: Select all

  Dim tsTab As TabStripTab
  
  Set tsTab = TabStrip1.Tabs.Add("Tab 1")
  tsTab.hAssociatedWindow = Frame1.hWnd
Now the TabStrip control will make sure that the correct frame is made visible when switching between the tab pages.

Regards
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Andreas Vogt
Cadet
Posts: 5
Joined: 04 Oct 2013, 20:13

Re: place frames in TabStrip

Post by Andreas Vogt »

Hi Timo,
thanks for help!
BTW: it also works when the frame is outside the tabstrip - but then you have to place it relative to the form.

Andreas
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: place frames in TabStrip

Post by TiKu »

Andreas Vogt wrote:BTW: it also works when the frame is outside the tabstrip - but then you have to place it relative to the form.
Yes, you're right. For attaching the frames to the tabs, they don't need to be children of the tab control. But you won't get proper theming (with transparent frame background) if the frame controls are not children of the tab control. On the other hand, proper theming is something that works only with my ButtonControls library anyway. So if you use the VB6 frame control, it doesn't matter whether it's a child of the tab control or of the form.

Regards
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Andreas Vogt
Cadet
Posts: 5
Joined: 04 Oct 2013, 20:13

Re: place frames in TabStrip

Post by Andreas Vogt »

Hi,
I think I found something like a bug.
When I try to set the Tab-Placement it works for TB.TabPlacement = tpTop and TB.TabPlacement = tpBottom
But when I try "tpLeft" or "tpRight" I get the error 382: "Set wird zur Laufzeit nicht unterstützt"
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: place frames in TabStrip

Post by TiKu »

It's not a bug. You really cannot change tab placement to one of these two values at runtime. Windows does not allow it.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Post Reply