Jump to content

Child Within Tab


AcidCorps
 Share

Recommended Posts

I'm working on a Unattended XP Creator (simular to nLite) but I'm having trouble with one of the tabs so heres the script:

#include <GuiConstants.au3>
#include <Array.au3>
#include <ACFunctions.au3>

$Width = 600
$Height = 400

Const $HDDDrives = DriveGetDrive('Fixed')
Dim $HDDPartitions[$HDDDrives[0] + 1][2]

$MainGUI = GUICreate('AcidXP', $Width, $Height)
GUICtrlCreateTab(0, 0, $Width + 5, $Height + 5)
GUICtrlCreateTabItem('Partition')
GUICtrlCreateLabel('Found Hard Drives:', 5, 40, 120, 15)

For $i = 1 To $HDDDrives[0]
    GUICtrlCreateLabel('Hard Drive ' & $i - 1 & ': ' & StringUpper($HDDDrives[$i]) & '\', 10, 40 + (20 * $i), 120, 15)
Next

GUICtrlCreateTabItem('Configuration')

GUICtrlCreateLabel('Windows Directory:', 5, 40, 115, 15, $SS_RIGHT)
$WinDir = GUICtrlCreateInput('\WINDOWS', 125, 40, 150, 15)
GUICtrlCreateLabel('Program Files Directory:', 5, 65, 115, 15, $SS_RIGHT)
$ProgDir = GUICtrlCreateInput('%SystemDrive%\Program Files', 125, 65, 150, 15)
GUICtrlCreateLabel('Common Files:', 5, 85, 115, 15, $SS_RIGHT)
$CommonDir = GUICtrlCreateInput('%SystemDrive%\Program Files\Common Files', 125, 85, 150, 15)

GUICtrlCreateLabel('Ignore Driver Signing Policy?', 5, 105, 140, 15, $SS_RIGHT)
GUICtrlCreateGroup('', 150, 105, 1, 1, -1, $WS_EX_TRANSPARENT)
$Yes1 = GUICtrlCreateRadio('Yes', 150, 105, 35, 15)
$No1 = GUICtrlCreateRadio('No', 190, 105, 35, 15)
GUICtrlCreateGroup('', -99, -99)
GUICtrlSetState($Yes1, $GUI_CHECKED)

$AddDrives = GUICtrlCreateButton('Add More', 225, 105, 50, 15)

GUICtrlCreateLabel('Auto-Activate Windows:', 5, 125, 140, 15, $SS_RIGHT)
GUICtrlCreateGroup('', 150, 125, 1, 1, -1, $WS_EX_TRANSPARENT)
$Yes2 = GUICtrlCreateRadio('Yes', 150, 125, 35, 15)
$No2 = GUICtrlCreateRadio('No', 190, 125, 35, 15)
GUICtrlCreateGroup('', -99, -99)
GUICtrlSetState($No2, $GUI_CHECKED)

GUICtrlCreateLabel('Keyboard Layout:', 5, 147, 115, 15, $SS_RIGHT)
$Keyboard = GUICtrlCreateCombo('(Default)', 125, 145, 150, 15)
GUICtrlSetData($Keyboard, 'Albanian|Belarusian|Belgian Dutch|Belgian French|Brazilian (ABNT)|Bulgarian|Bulgarian Latin|Canadian English (Multilingual)|Canadian French|Canadian French (Multilingual)|Croatian|Czech|Czech (QWERTY)|Danish|Dutch|Estonian|Finnish|French|German|German (IBM)|Greek|Greek Latin|Greek (220)|Greek (220) Latin|Greek (319)|Greek (319) Latin|Hungarian|Hungarian 101-key|Icelandic|Irish|Italian|Italian (142)|Latin American|Latvian|Latvian (QWERTY)|Lithuanian|Norwegian|Polish (Programmers)|Polish (214)|Portuguese|Romanian|Russian|Russian (Typewriter)|Serbian Cyrillic|Serbian Latin|Slovak|Slovak (QWERTY)|Slovenian|Spanish|Spanish variation|Swedish|Swiss French|Swiss German|Turkish F|Turkish Q|Ukrainian|United Kingdom|US|US-Dvorak|US-Dvorak for left hand|US-Dvorak for right hand|US-International')

GUICtrlCreateLabel('', 300, 21, 1, 400, $SS_SUNKEN)
GUICtrlCreateLabel('', 0, 200, 600, 1, $SS_SUNKEN)

$UserGui = GUICreate('Users', 300, 200, -1, -1, -1, $WS_EX_MDICHILD, $MainGUI)


GUISetState(@SW_SHOW, $MainGui)
GUISetState(@SW_SHOW, $UserGui)
GUISwitch($MainGUI)


While 1
    $Msg = GUIGetMsg()
    Select
        Case $Msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
WEnd

I'm trying to make it so the child GUI ($UserGui) shows up in the bottem left box of the configuration tab (not moveable)

if anyone knows how to use tabs within tabs that would work just as well

Link to comment
Share on other sites

Pretty sure you can just position a child window where you want it, and when your tab is focused, show the window, and then hide the window when it is unfocused. :D

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...