Jump to content
Sign in to follow this  
michael2t

In a Single Tab ..I need example Parent GUI and Child GUI

Recommended Posts

michael2t

Hello All....

I am using Tabs and I need a child window in a parent window that is Only on the 3 tab window of 6 tabs ...

I hope that is able to be understood ... I need a child window in one of the tabs only ... Maybe that is better ...

I can not get it to work ...

Help anyone please ...

Michael T.

Share this post


Link to post
Share on other sites
BrettF

Hi,

Next time post your code.

But this worked for me. You will have to modify it to suit your needs though.

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
$buffer = False

$hGUI = GUICreate ("GUI Test", 800, 600)
$hTabs = GUICtrlCreateTab (10, 10, 780, 580)
$hTabPage1 = GUICtrlCreateTabItem ("Tab 1")
$hTabPage2 = GUICtrlCreateTabItem ("Tab 2")
$hTabPage3 = GUICtrlCreateTabItem ("Tab 3")
$hTabPage4 = GUICtrlCreateTabItem ("Tab 4")
$hGUI2 = GUICreate ("", 745, 520, 25, 50, $WS_POPUP, $WS_EX_MDICHILD, $hGUI)
GUISetBkColor (0x000000, $hGUI2)

GUISetState (@SW_SHOW, $hGUI)
While 1
    $nMsg = GUIGetMsg ()
    Select
        Case $nMsg = $GUI_EVENT_CLOSE
            Exit
        Case GUICtrlRead ($hTabs, 1) = $hTabPage3
            If Not $buffer Then
                $buffer = True
                GUISetState (@SW_SHOW, $hGUI2)
                GUISwitch ($hGUI)
            EndIf
        Case GUICtrlRead ($hTabs, 1) = $hTabPage1 Or $hTabPage2 Or $hTabPage3
            If $buffer Then
                $buffer = False
                GUISetState (@SW_Hide, $hGUI2)
                GUISwitch ($hGUI)
            EndIf
    EndSelect
WEnd

Share this post


Link to post
Share on other sites
michael2t

Hello Brett,

That worked great ...

I am sorry about not post any code ...

thanks ...

I can not thank you enough

Michael T.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×