jjohn Posted February 8, 2006 Posted February 8, 2006 (edited) Please help, I need to draw a pie by GUICtrlSetGraphic on tab2 of the following, I never able to show it, I know it is on the main panel, just covered by the tabs. Or is it possible at all to draw something on a tab item? #include <GUIConstants.au3> ; == GUI generated with Koda == $Form1 = GUICreate("pac man", 622, 441, 192, 125) $Tab1 = GUICtrlCreateTab(42, 66, 534, 326) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") $Graphic1 = GUICtrlCreateGraphic(198, 157, 80, 97) GUICtrlSetBkColor(-1,0xffffff) GUICtrlSetColor(-1,0) GUICtrlSetGraphic(-1,$GUI_GR_COLOR, 0xff0000,0xff0000) GUICtrlSetGraphic(-1,$GUI_GR_PIE, 40,40, 40,30,270) $TabSheet3 = GUICtrlCreateTabItem("TabSheet3") GUICtrlSetState(-1,$GUI_SHOW) GUICtrlCreateTabItem("") GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;;;;;; EndSelect WEnd Exit Edited February 8, 2006 by jjohn
jpm Posted February 15, 2006 Posted February 15, 2006 Graphics are always in the background so you cannot draw on a tab. It is by design
jjohn Posted February 16, 2006 Author Posted February 16, 2006 thanks for telling me, now i learnt more.
GaryFrost Posted February 16, 2006 Posted February 16, 2006 (edited) doens't mean you make it look like it's on the tab. expandcollapse popup#include <GUIConstants.au3> ; == GUI generated with Koda == $Form1 = GUICreate("pac man", 622, 441, 192, 125) $gui_graphic = GUICreate("", 529, 300, 45, 90, BitOR($WS_CHILD, $WS_TABSTOP), -1, $Form1) $Graphic1 = GUICtrlCreateGraphic(198, 157, 80, 97) GUICtrlSetBkColor(-1, 0xffffff) GUICtrlSetColor(-1, 0) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff0000, 0xff0000) GUICtrlSetGraphic(-1, $GUI_GR_PIE, 40, 40, 40, 30, 270) GUISwitch($Form1) $Tab1 = GUICtrlCreateTab(42, 66, 534, 326) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") $TabSheet3 = GUICtrlCreateTabItem("TabSheet3") GUICtrlSetState($gui_graphic, $GUI_SHOW) GUICtrlCreateTabItem("") GUISwitch($Form1) GUISetState(@SW_SHOW, $Form1) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Tab1 $tabidx = GUICtrlRead($Tab1) Select Case $tabidx = 0 GUISetState(@SW_HIDE, $gui_graphic) Case $tabidx = 1 GUISetState(@SW_SHOW, $gui_graphic) Case $tabidx = 2 GUISetState(@SW_HIDE, $gui_graphic) EndSelect Case Else ;;;;;;; EndSelect WEnd Exit Edited February 16, 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.
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