Guille Posted February 12, 2006 Share Posted February 12, 2006 Hi all, new question: Why, with this code, the tab is not displayed when there is a group arroud it? a bug? is there a way to display it? Is it possible to set the inside of the tab at the same color that the rest of form? (not white). Thx #include <GUIConstants.au3> ; == GUI generated with Koda == $Form1 = GUICreate("AForm1", 622, 441, 192, 125) $Group1 = GUICtrlCreateGroup("AGroup1", 72, 72, 449, 289) $Tab1 = GUICtrlCreateTab(136, 144, 313, 169) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") $TabSheet3 = GUICtrlCreateTabItem("TabSheet3") GUICtrlCreateTabItem("") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;;;;;; EndSelect WEnd Exit Link to comment Share on other sites More sharing options...
GaryFrost Posted February 13, 2006 Share Posted February 13, 2006 #include <GUIConstants.au3> ; == GUI generated with Koda == $Form1 = GUICreate("AForm1", 622, 441, 192, 125) $Group1 = GUICtrlCreateGroup("AGroup1", 72, 72, 449, 289,-1,$WS_EX_TRANSPARENT ) $Tab1 = GUICtrlCreateTab(136, 144, 313, 169) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") $TabSheet3 = GUICtrlCreateTabItem("TabSheet3") GUICtrlCreateTabItem("") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;;;;;; EndSelect WEnd Exit SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Guille Posted February 13, 2006 Author Share Posted February 13, 2006 Thx a lot, It works perfectly, and is there a way to change the color of inside the tab? Link to comment Share on other sites More sharing options...
Guille Posted February 17, 2006 Author Share Posted February 17, 2006 New question: is it possible to disable (or hide) a tab? I can't find out a "working" way to do that from code. Link to comment Share on other sites More sharing options...
Guille Posted February 21, 2006 Author Share Posted February 21, 2006 it cannot be done, isn't it? Plz some can tell me. I pretty sure but I need a confirm. Link to comment Share on other sites More sharing options...
GaryFrost Posted February 21, 2006 Share Posted February 21, 2006 (edited) it cannot be done, isn't it? Plz some can tell me. I pretty sure but I need a confirm. No, but you can delete it, and recreate it #include <GUIConstants.au3> ; == GUI generated with Koda == $Form1 = GUICreate("AForm1", 622, 441, 192, 125) $Group1 = GUICtrlCreateGroup("AGroup1", 72, 72, 449, 289, -1, $WS_EX_TRANSPARENT) $Tab1 = GUICtrlCreateTab(136, 144, 313, 169) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") $button = GUICtrlCreateButton("testing", 150, 190) $TabSheet3 = GUICtrlCreateTabItem("TabSheet3") GUICtrlCreateTabItem("") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState() $btn_delete = GUICtrlCreateButton("delete", 150, 400) $btn_create = GUICtrlCreateButton("create", 225, 400) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $btn_delete GUICtrlDelete($TabSheet2) Case $msg = $btn_create $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") $button = GUICtrlCreateButton("testing", 150, 190) Case Else ;;;;;;; EndSelect WEnd Exit Edited February 21, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Guille Posted February 22, 2006 Author Share Posted February 22, 2006 Thx to relply, I already think of it but the problem is I would delete and then recreate in a random order and then after a while I could have: TAB 1 \ TAB 4 \ TAB3 \ TAB 2 So I can't permit it, "My" solution to the problem is to disable all the controls I have (11 controls) and then enable then again, shame that they still stay in white when disabled. Tab is really bugy.. I don't really like it but it's the best i can do. Link to comment Share on other sites More sharing options...
GaryFrost Posted February 22, 2006 Share Posted February 22, 2006 Thx to relply,I already think of it but the problem is I would delete and then recreate in a random order and then after a while I could have: TAB 1 \ TAB 4 \ TAB3 \ TAB 2So I can't permit it,"My" solution to the problem is to disable all the controls I have (11 controls) and then enable then again, shame that they still stay in white when disabled. Tab is really bugy..I don't really like it but it's the best i can do. There is another option, give me a few i'll show you SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
GaryFrost Posted February 22, 2006 Share Posted February 22, 2006 (edited) expandcollapse popup#include <GUIConstants.au3> Dim $hide = 1 ; == GUI generated with Koda == $main_GUI = GUICreate("Main Window", 622, 441, 192, 125) $child2 = GUICreate("", 290, 140, 150, 170, BitOR($WS_CHILD, $WS_TABSTOP), -1, $main_GUI) $button = GUICtrlCreateButton("testing", 10, 10) GUISwitch($main_GUI) $Group1 = GUICtrlCreateGroup("AGroup1", 72, 72, 449, 289, -1, $WS_EX_TRANSPARENT) $Tab1 = GUICtrlCreateTab(136, 144, 313, 169) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") $TabSheet3 = GUICtrlCreateTabItem("TabSheet3") GUICtrlCreateTabItem("") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW, $main_GUI) $btn_hide = GUICtrlCreateButton("hide", 150, 400) $btn_show = GUICtrlCreateButton("show", 225, 400) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $btn_hide $hide = 1 GUISetState(@SW_HIDE, $child2) Case $msg = $btn_show $hide = 0 GUISetState(@SW_SHOW, $child2) Case $msg = $Tab1 GUISetState(@SW_HIDE, $child2) $tabidx = GUICtrlRead($Tab1) Select Case $tabidx = 0 Case $tabidx = 1 If Not $hide Then GUISetState(@SW_SHOW, $child2) Case $tabidx = 2 EndSelect Case Else ;;;;;;; EndSelect WEnd Exit Edited February 22, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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