Jump to content
Sign in to follow this  
twbradio

Is this a bug?

Recommended Posts

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 by twbradio

Anyone have a TRS 80 Model III for sale?

Share this post


Link to post
Share on other sites

Hi :idiot:

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
Exit

Regards Holger

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...