Vadersapien Posted December 14, 2009 Share Posted December 14, 2009 Hello, If I create a tab with GUICtrlCreateTab() and then try to add another tab inside that, it doesn't seem to work. Is there a workaround for this or is it just impossible? Here is a picture of what I am trying to do: Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor. Link to comment Share on other sites More sharing options...
Yashied Posted December 14, 2009 Share Posted December 14, 2009 http://www.autoitscript.com/forum/index.php?showtopic=77845 My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Vadersapien Posted December 14, 2009 Author Share Posted December 14, 2009 Thanks for the link, although I can't get any to work...they just seem to give me warnings and errors...Here is the output from scite for the second example:C:\Users\Josh\Desktop\AutoIt Scripts\Experimental Script.au3(7,85) : WARNING: $GUI_SS_DEFAULT_GUI: possibly used before declaration.$main_GUI = GUICreate("Multiple TABs",520,250,-1,-1,BitOr($GUI_SS_DEFAULT_GUI,~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^C:\Users\Josh\Desktop\AutoIt Scripts\Experimental Script.au3(7,102) : WARNING: $WS_CLIPSIBLINGS: possibly used before declaration.$main_GUI = GUICreate("Multiple TABs",520,250,-1,-1,BitOr($GUI_SS_DEFAULT_GUI,$WS_CLIPSIBLINGS)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^C:\Users\Josh\Desktop\AutoIt Scripts\Experimental Script.au3(14,61) : WARNING: $WS_CHILD: possibly used before declaration.$child1 = GUICreate("",230,170,15,35,BitOr($WS_CHILD,~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^C:\Users\Josh\Desktop\AutoIt Scripts\Experimental Script.au3(14,73) : WARNING: $WS_TABSTOP: possibly used before declaration.$child1 = GUICreate("",230,170,15,35,BitOr($WS_CHILD,$WS_TABSTOP)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^C:\Users\Josh\Desktop\AutoIt Scripts\Experimental Script.au3(7,85) : ERROR: $GUI_SS_DEFAULT_GUI: undeclared global variable.$main_GUI = GUICreate("Multiple TABs",520,250,-1,-1,BitOr($GUI_SS_DEFAULT_GUI,~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^C:\Users\Josh\Desktop\AutoIt Scripts\Experimental Script.au3 - 1 error(s), 4 warning(s)Possibly missing an include file? Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor. Link to comment Share on other sites More sharing options...
funkey Posted December 14, 2009 Share Posted December 14, 2009 You could use my OwnTab-UDF.#745231 Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
Vadersapien Posted December 14, 2009 Author Share Posted December 14, 2009 (edited) I've been considering your OwnTab UDF, but I really wanted the native OS look. Can this be achieved with your UDF? Edited December 14, 2009 by Vadersapien Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor. Link to comment Share on other sites More sharing options...
Authenticity Posted December 15, 2009 Share Posted December 15, 2009 expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) Local $hGUI, $Tab, $hTab, $TabItem1, $TabItem2, $hChild1, $hChild2, $Btn1Child1, $Btn2Child1, $Btn1Child2, $Btn2Child2 $hGUI = GUICreate("Title", 300, 300) $Tab = GUICtrlCreateTab(0, 0, 300, 300) $hTab = GUICtrlGetHandle(-1) GUICtrlCreateTabItem("Tab1") GUICtrlCreateTabItem("Tab2") $TabItem1 = 0 $TabItem2 = 1 $hChild1 = GUICreate("", 200, 200, 50, 50, $WS_CHILD, -1, $hTab) GUICtrlCreateTab(0, 0, 200, 200) GUICtrlCreateTabItem("Child1 Tab1") $Btn1Child1 = GUICtrlCreateButton("Button 1", 65, 90, 70, 25) GUICtrlCreateTabItem("Child1 Tab2") $Btn2Child1 = GUICtrlCreateButton("Button 2", 65, 90, 70, 25) GUISwitch($hChild1) GUISetState() $hChild2 = GUICreate("", 200, 200, 50, 50, $WS_CHILD, -1, $hTab) GUICtrlCreateTab(0, 0, 200, 200) GUICtrlCreateTabItem("Child2 Tab1") $Btn1Child2 = GUICtrlCreateButton("Button 1", 65, 90, 70, 25) GUICtrlCreateTabItem("Child2 Tab2") $Btn2Child2 = GUICtrlCreateButton("Button 2", 65, 90, 70, 25) GUISwitch($hGUI) GUISetState() While 1 Switch GUIGetMsg() Case $Tab Switch GUICtrlRead($Tab) Case $TabItem1 GUISetState(@SW_HIDE, $hChild2) GUISetState(@SW_SHOW, $hChild1) Case $TabItem2 GUISetState(@SW_HIDE, $hChild1) GUISetState(@SW_SHOW, $hChild2) EndSwitch Case $Btn1Child1 ConsoleWrite("Button1 Child1" & @CRLF) Case $Btn2Child1 ConsoleWrite("Button2 Child1" & @CRLF) Case $Btn1Child2 ConsoleWrite("Button1 Child2" & @CRLF) Case $Btn2Child2 ConsoleWrite("Button2 Child2" & @CRLF) Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() Exit I hope it's not flickering over there, if yes, consider using _WinAPI_SetWindowPos. Link to comment Share on other sites More sharing options...
Vadersapien Posted December 15, 2009 Author Share Posted December 15, 2009 Thanks Authenticity! Helpful as always . It works perfect, athough I find it easier to use Switch GUICtrlRead($Tab, 1) That way you can directly specify the Control ID of the tab in the Case statement. Try Pacfox, my Firefox theme.Try Power Eject, my windows gadget that allows you to eject most drives.Using AutoIt 3.3.4.0, Windows 7 Premium, Intel Core 2 Quad CPU @ 2.66ghz, 4gb RAM, Nvidia GeForce 9500GT Graphics Card & Samsung 22" Monitor. Link to comment Share on other sites More sharing options...
ReFran Posted December 15, 2009 Share Posted December 15, 2009 You may have a look at this example: http://www.autoitscript.com/forum/index.php?showtopic=63489&st=0&p=474000&hl=reinhard%20tab%20on%20tab&fromsearch=1&#entry474000 It's round about what you got already, but the tabswitch in a function gives you a higher flexibility and cost nothing HTH, Reinhard Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now