Jump to content

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


michael2t
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...