twbradio 0 Posted January 17, 2005 (edited) OOops - make that nested GUI :"> . I have noticed a limitation in Autoit GUI in that it does not support the drawing of geometric shapes on the GUI windows (or at least I didn't see a way to do this - BTW this is not a complaint - AutoIT GUI rocks). That said, I have been using the LABEL function with null text to provide a square box of color behind a set of radio buttons in my program. If I place the box behind the buttons, the buttons are visible, but I can not select them. If I place the box over the buttons, the buttons disappear until you hover over them, and then they appear and work. It is as if the layering is backwards somehow. I have included sample code below: Example 1 with LABEL box behind the radio buttons: #include <GuiConstants.au3> DIM $SKDRAW[11][5] $SK = GuiCreate("South Campus", 212, 235, (@DesktopWidth-500)/2, (@DesktopHeight-500)/2 , 0, $WS_EX_TOOLWINDOW) GUISetBkColor ( 0xaa0055, $SK ) $NULLDRAW = GUICtrlCreateLabel ( " ", 40, 23, 34, 182, $SS_SUNKEN ) GUICtrlSetBkColor($NULLDRAW,0xffffd9) FOR $N = 1 TO 10 $SKDRAW[$N][4] = GuiCtrlCreateRadio ( "", 51, 9+($N - 1)*20, 12, 12) GUICtrlSetBkColor($SKDRAW[$N][4],0xffffd9) NEXT GuiSetState(@SW_SHOW, $SK) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit Example 2 with the radio box in front of the radio buttons: #include <GuiConstants.au3> DIM $SKDRAW[11][5] $SK = GuiCreate("South Campus", 212, 235, (@DesktopWidth-500)/2, (@DesktopHeight-500)/2 , 0, $WS_EX_TOOLWINDOW) GUISetBkColor ( 0xaa0055, $SK ) FOR $N = 1 TO 10 $SKDRAW[$N][4] = GuiCtrlCreateRadio ( "", 51, 9+($N - 1)*20, 12, 12) GUICtrlSetBkColor($SKDRAW[$N][4],0xffffd9) NEXT $NULLDRAW = GUICtrlCreateLabel ( " ", 40, 23, 34, 182, $SS_SUNKEN ) GUICtrlSetBkColor($NULLDRAW,0xffffd9) GuiSetState(@SW_SHOW, $SK) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit Thanks in advance for your help. Tom Brown Edited January 17, 2005 by twbradio Anyone have a TRS 80 Model III for sale? Share this post Link to post Share on other sites
Holger 14 Posted January 17, 2005 Hi take the second script and add the style WS_CLIPSIBLINGS to the label-control, like:#include <GuiConstants.au3> $WS_CLIPSIBLINGS = 0x04000000 DIM $SKDRAW[11][5] $SK = GuiCreate("South Campus", 212, 235, (@DesktopWidth-500)/2, (@DesktopHeight-500)/2 , 0, $WS_EX_TOOLWINDOW) GUISetBkColor ( 0xaa0055, $SK ) FOR $N = 1 TO 10 $SKDRAW[$N][4] = GuiCtrlCreateRadio ( "", 51, 9+($N - 1)*20, 12, 12) GUICtrlSetBkColor($SKDRAW[$N][4],0xffffd9) NEXT $NULLDRAW = GUICtrlCreateLabel ( " ", 40, 23, 34, 182,BitOr($SS_SUNKEN,$WS_CLIPSIBLINGS)) GUICtrlSetBkColor($NULLDRAW,0xffffd9) GuiSetState(@SW_SHOW, $SK) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd ExitRegards Holger Old project:GUI/Tray menu with icons and colorsOther old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Share this post Link to post Share on other sites
twbradio 0 Posted January 17, 2005 That worked very well, Thank you. Tom Anyone have a TRS 80 Model III for sale? Share this post Link to post Share on other sites