AcidCorps 1 Posted September 21, 2007 I'm trying to get the tabs to be resized with my gui heres my script so far expandcollapse popup#Include <Date.au3> #include <GuiConstants.au3> #include <Array.au3> ;Constants $Ini = @ScriptDir & "\Data\TWP.ini" $SavedIni = @ScriptDir & "\Saved\Test.ud" $Title = IniRead($Ini, "Information", "Title", "") $Author = IniRead($Ini, "Information", "Author", "") $Version = IniRead($Ini, "Information", "Version", "") $GuiWidth = @DesktopWidth /2 $GuiHeight = @DesktopHeight /2 $TabWidth = $GuiWidth $TabHeight = $GuiHeight ;Variables $FNameL = IniRead($SavedIni, "UserData", "FName", "") $LNameL = IniRead($SavedIni, "UserData", "LName", "") $ClassL = IniRead($SavedIni, "Class", "Class", "") $ProfL = IniRead($SavedIni, "Class", "Prof", "") ;If $DateI = "" Then $DateL = _NowDate ( ) ;If $DateI <> "" Then $DateL = $DateI ;Gui Start $Gui = GuiCreate($Title, $GuiWidth, $GuiHeight, -1, -1, BitOr($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX,$WS_SIZEBOX)) $OrgPos = WinGetPos($Gui) $Tabs = GuiCtrlCreateTab(1,1,$TabWidth, $TabHeight) ;Information Tab GuiCtrlCreateTabItem("Information Tab") GuiCtrlCreateLabel("First Name:", 5, 40, 55) $FName = GuiCtrlCreateInput(" ", 65, 40, 100, 15) GuiCtrlCreateLabel("Last Name:", 5, 65, 55) $LName = GuiCtrlCreateInput(" ", 65, 65, 100, 15) ;Introduction Tab ;Body Tab ;Bibliography Tab ;Add Tab ;Set Data GuiCtrlSetData($FName, $FNameL) GuiCtrlSetData($LName, $LNameL) ;Gui End GuiSetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE $GuiPos = WinGetPos($Gui) If $OrgPos[0] <> $GuiPos[0] Or $OrgPos[1] <> $GuiPos[1] Or $OrgPos[2] <> $GuiPos[2] Or $OrgPos[3] <> $GuiPos[3] Then $OrgPos[0] = $GuiPos[0] $OrgPos[1] = $GuiPos[1] $OrgPos[2] = $GuiPos[2] $OrgPos[3] = $GuiPos[3] WinMove($Tabs, "", $OrgPos[0], $GuiPos[1], $GuiPos[2], $GuiPos[3]) EndIf WEnd ;Testing (If you see this section please alert Acid Corps) ;_TestVar($Date) Func _Test($iVar) MsgBox(0,"",$iVar) EndFunc I'm sure theres some little thing I'm doing wrong Share this post Link to post Share on other sites
Siao 6 Posted September 21, 2007 (edited) If you read help file, in GUICtrlCreateTab() remarks it says that "Default resizing is $GUI_DOCKSIZE." (which means "size will not change" as you can learn by searching for "$GUI_DOCKSIZE" in that very same help file) So, $Tabs = GuiCtrlCreateTab(1,1,$TabWidth, $TabHeight) GUICtrlSetResizing(-1, $GUI_DOCKAUTO) ;or other method of resizing instead of $GUI_DOCKAUTO. Edited September 21, 2007 by Siao "be smart, drink your wine" Share this post Link to post Share on other sites
AcidCorps 1 Posted September 21, 2007 (edited) Thanks works great how do you prevent the controls from resizing with it though? Edited September 21, 2007 by AcidCorps Share this post Link to post Share on other sites