cyberlive Posted May 14, 2014 Share Posted May 14, 2014 Good day All - Have created numerous GUICtrlTabItems (approximately 10) that correspond to GUICtrlCreateCheckboxes. The size of the GUI allows me to display 6 of the TabItems before i have to click in the upper right hand corner to scroll to the other TabItems. Of couse if i change the size of the GUI it will display all TabItems, but i don't like the looks after doing that. Would someone point me in the right direction please if there is a way to do an under / over approach when creating TabItems? Something similar to the followiing; TabItem 1 TabItem2 TabItem3 TabItem 4 TabItem5 TabItem6 Thank you Link to comment Share on other sites More sharing options...
Kovacic Posted May 14, 2014 Share Posted May 14, 2014 (edited) I made a very messy script that might help you set the style you want, this lets you go through various styles and shows you what they look like so you can pick the one you want.. this is very messy because i wrote it in like 3 minutes so im just warning you now.. enjoy: expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiTab.au3> global $muhval = 0 GUICreate("My GUI Tab", 450, 350) $butt = Guictrlcreatebutton("SET",10,10,50,20) $skroll = Guictrlcreatebutton("skroll",10,30,50,20) $bup = Guictrlcreatebutton("up",200,40,50,20) $bdown = Guictrlcreatebutton("down",200,70,50,20) $inp = Guictrlcreateinput("0x0000",70,10, 209, 28) $tab = GUICtrlCreateTab(100, 100, 200, 100) $tab0 = GUICtrlCreateTabItem("tab0") GUICtrlCreateLabel("label0", 30, 80, 50, 20) $tab1 = GUICtrlCreateTabItem("tab1") GUICtrlCreateLabel("label1", 30, 80, 50, 20) $tab2 = GUICtrlCreateTabItem("tab2") GUICtrlCreateLabel("label2", 30, 80, 50, 20) GUISetState() ;_GUICtrlTab_SetCurFocus($tab, 1) ;_GUICtrlTab_SetCurSel($tab, 1) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $butt change() Case $skroll skroll() case $bup up() case $bdown down() endswitch WEnd func change() Guictrlsetstyle($tab, guictrlread($inp)) guictrlsetdata($skroll, guictrlread($inp)) endfunc func skroll() do $MuhVal +=1 $blah = 0x & $muhval Guictrlsetstyle($tab, $blah) guictrlsetdata($skroll, $blah) sleep(100) until $MuhVal = 9999 endfunc func up() $MuhVal +=1 $blah = 0x & $muhval Guictrlsetstyle($tab, $blah) guictrlsetdata($skroll, $blah) endfunc Func down() $MuhVal -=1 $blah = 0x & $muhval Guictrlsetstyle($tab, $blah) guictrlsetdata($skroll, $blah) endfunc ** Fixed down function Edited May 14, 2014 by Kovacic C0d3 is P0etry( ͡° ͜ʖ ͡°) Link to comment Share on other sites More sharing options...
cyberlive Posted May 14, 2014 Author Share Posted May 14, 2014 Thank you Kovacic. This is what i was hoping for. Thanks again. Link to comment Share on other sites More sharing options...
Solution Kovacic Posted May 14, 2014 Solution Share Posted May 14, 2014 Thank you Kovacic. This is what i was hoping for. Thanks again. yw C0d3 is P0etry( ͡° ͜ʖ ͡°) Link to comment Share on other sites More sharing options...
Zedna Posted May 15, 2014 Share Posted May 15, 2014 Just for the reference and other readers. Tab control style $TCS_MULTILINE does the job: $Tab1 = GUICtrlCreateTab(32, 24, 185, 193, $TCS_MULTILINE) whole example #include <GUIConstantsEx.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 266, 263, 192, 114) $Tab1 = GUICtrlCreateTab(32, 24, 185, 193, $TCS_MULTILINE) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") $TabSheet3 = GUICtrlCreateTabItem("TabSheet3") GUICtrlSetState(-1,$GUI_SHOW) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Resources UDF ResourcesEx UDF AutoIt Forum Search 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