Jump to content
Sign in to follow this  
BeardedBlunder

Gui Troubles

Recommended Posts

BeardedBlunder

OK, I'm probably going to look like a fool, but for some very odd reason, my radio button group will only change which is selected if i use the keyboar & not the mouse..

what am i missing?

Share this post


Link to post
Share on other sites
BeardedBlunder

May We please see the code. :whistle:

OK but it's virtually copy / paste from the help file

#include <GUIConstants.au3>
$installer2 = GUICreate("Program Install", 528)  ; will create a dialog box that when displayed is centered

GUICtrlCreatePic("D:\3.0h1_files\logo.bmp", -1, -1 , 528, 86)       ;set image along top

    
    $heading2 = GUICtrlCreateLabel( "Pick Version", 20, 106, 488, 40, $SS_SIMPLE  )
    GUICtrlSetFont( $heading2, 20, 600 )
    $text2 = GUICtrlCreateLabel( "Set program folder and other options" & @LF & @LF & @LF , 20, 146, 488, 200, $SS_CENTER )
    GUICtrlCreateGroup ("Program Version", 30, 160, 140, 100)
    $ver1 = GUICtrlCreateRadio("V 1.0", 40, 180, 100, 20 )
    $ver2 = GUICtrlCreateRadio("v 2.0", 40, 200, 100, 20 )
    $ver3 = GUICtrlCreateRadio("v 3.0", 40, 220, 100, 20 )
    GUICtrlSetState ($ver3, $GUI_CHECKED)
    GUICtrlCreateGroup ("",-99,-99,1,1)  ;close group
    
    
    $cancel = GUICtrlCreateButton( "&Cancel", 160, 350, 100, 30 )
    $next2 = GUICtrlCreateButton( "&Next >", 268, 350, 100, 30 )

        
    
GUISetState( @SW_SHOW, $installer2 )       ; will display
        



; Run the GUI until the dialog is closed
Do
    $msg = GUIGetMsg()
Select    
    Case $msg = $GUI_EVENT_CLOSE Or $msg = $cancel 
        Exit
    
    Case $msg = $ver1 And BitAND(GUICtrlRead($ver1), $GUI_CHECKED) = $GUI_CHECKED
           MsgBox(0, 'Info:', 'You clicked version 1')
    
    Case $msg = $ver2 And BitAND(GUICtrlRead($ver2), $GUI_CHECKED) = $GUI_CHECKED
           MsgBox(0, 'Info:', 'You clicked version 2')
    
    Case $msg = $ver3 And BitAND(GUICtrlRead($ver2), $GUI_CHECKED) = $GUI_CHECKED
           MsgBox(0, 'Info:', 'You clicked version 3')
EndSelect

Until $msg = $next2

obviously there's rather more than that, but even stripped down to that it exhibits the behaviour here,,

Share this post


Link to post
Share on other sites
Siao

Your $text2 label is too big and covers the radio buttons. Either reduce it or set its state to disabled (this would send it behind other controls).

Edited by Siao

"be smart, drink your wine"

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.