Click to See Complete Forum and Search --> : How do I make a frame visible on top of everything else, including an SSTab


MarkRM
November 25th, 1999, 12:30 PM
I am stuck with trying to place a frame containing status information so that it is always visible on every tab of an SSTab Tabbed Dialog Control.

I need to display a frame containing live status information in the same position and with the same content on each tab, without having to create an array of identical frames which would all need to be updated every time the status changes.

I have tried to do this using ZOrder as shown below, without any luck.


private Sub tabPte_Click(PreviousTab as Integer)
' Bring the status info to the front of everything, except on Options tab
If (tabPte.Tab <> (tabPte.Tabs - 1)) then
fraTrafficAlarms.ZOrder 0
End If
End Sub




I have also considered moving the control from one tab to the other at runtime, but can't work out how to tell it which tab to show on. The code below (taken from MSDN Container Property example) gave me this idea, but I can't see how to apply it to my code.


private Sub Form_Click()
static intX as Integer
Select Case intX
Case 0
set Command1.Container = Picture1
Command1.Top= 0
Command1.Left= 0
Case 1
set Command1.Container = Frame1
Command1.Top= 0
Command1.Left= 0
Case 2
set Command1.Container = Form1
Command1.Top= 0
Command1.Left= 0
End Select
intX = intX + 1
End Sub




The tabs take up my whole application area, a bit like the Win95/98 Display Properties dialog, but without the OK/Cancel buttons below the tabs.

Thanks in advance to anyone who can help :-)

Mark

vick
November 26th, 1999, 01:40 AM
Hi Mark,

The answer in simple, and there is no code involved. All you have to do is create the frame on the form and NOT on the Tabbed Dialog Control. Once you've created the frame, drag the frame onto the required area of the tabs.

When select any of the tabs, the frame should still be visible.

Hope this helps.

Vick Soulios

Ravi Kiran
November 26th, 1999, 02:22 AM
To explain Vicks answer a little:

First create your SS tab . Then Create the other controls inside SS tab. SStab is a container control, so the child controls will stay put inside it.

Then you select a frame control, and start its drawing somewhere on the (base) Form. SO that the frame is not a child of SS tab but the Form. Change the Frame to the size you want, and you may even place it over the SS tab itself. Since the frame was created after SStab, it is higher in the zorder, and hence can be positioned ON top.


RK

Vlado B
November 26th, 1999, 03:00 AM
You can put Picturebox on each tab, than put all your controls on each of this picture boxes instead of putting it on tab, then you can set container for your Status Frame to active picturebox.

Private Sub SSTab1_Click(PreviousTab As Integer)
Set StatusFrame.Container = Picture1(SSTab1.Tab)
End Sub

or you can use TabStrip control from Microsoft Windows Common Controls 6.0 component, it is not a container so it will stay below all of your controls anyway, but in this case you should change what would be visible for each tab by yourself.

Vlado Bosnjakovic

vlado.bosnjakovic@amis.net

MarkRM
November 26th, 1999, 04:14 AM
Many thanks for your help, this worked perfectly :-)

Mark