Sign in to follow this  
Followers 0
Stretch

Disappearing Buttons Version 3.1.1.114

6 posts in this topic

Afternoon

Bit of a strange one - create this Gui and run the script.

#include <GuiConstants.au3>
#include <Array.au3>
#include <File.au3>

GUICreate("Test", 430, 226, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$on = GUICtrlCreateButton("On", 50, 70, 110, 50)
GUICtrlSetFont(-1, 15)
$off = GUICtrlCreateButton("Off", 270, 70, 110, 50)
GUICtrlSetFont(-1, 15)
$Button_4 = GUICtrlCreateButton("Configure Merchant Details", 70, 140, 290, 30)
GUICtrlSetFont(-1, 10)
$Button_5 = GUICtrlCreateButton("Set Minimum Credit Card Transaction Value", 70, 180, 290, 30)
GUICtrlSetFont(-1, 10)
$Label_4 = GUICtrlCreateLabel("Press a button to turn the Chip and Pin on or off", 6, 20, 430, 100)
GUICtrlSetFont(-1, 15)


GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $on

        Case $msg = $off

            Exit
            
        Case $msg = $Button_4

        Case $msg = $Button_5

        
        
    EndSelect
WEnd
Exit

There should be a button under 'button' and one under 'pin'.

On my laptop they do not show until you click them. Then they magically re-appear. Same code works fine when using released V3.1.1.

Do you get buttons or not?

Mark

Share this post


Link to post
Share on other sites



Seems to be a prolblem with the label being created when it was, changed it and now it works

#include <GuiConstants.au3>
#include <Array.au3>
#include <File.au3>

GUICreate("Test", 430, 226, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Label_4 = GUICtrlCreateLabel("Press a button to turn the Chip and Pin on or off", 6, 20, 430, 100)
GUICtrlSetFont(-1, 15)

$on = GUICtrlCreateButton("On", 50, 70, 110, 50)
GUICtrlSetFont(-1, 15)
$off = GUICtrlCreateButton("Off", 270, 70, 110, 50)
GUICtrlSetFont(-1, 15)

$Button_4 = GUICtrlCreateButton("Configure Merchant Details", 70, 140, 290, 30)
GUICtrlSetFont(-1, 10)
$Button_5 = GUICtrlCreateButton("Set Minimum Credit Card Transaction Value", 70, 180, 290, 30)
GUICtrlSetFont(-1, 10)


GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $on

        Case $msg = $off

            Exit
            
        Case $msg = $Button_4

        Case $msg = $Button_5

        
        
    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.

 

Share this post


Link to post
Share on other sites

#include <GuiConstants.au3>
#include <Array.au3>
#include <File.au3>

GUICreate("Test", 430, 226, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$on = GUICtrlCreateButton("On", 50, 70, 110, 50)
GUICtrlSetFont(-1, 15)
$off = GUICtrlCreateButton("Off", 270, 70, 110, 50)
GUICtrlSetFont(-1, 15)
$Button_4 = GUICtrlCreateButton("Configure Merchant Details", 70, 140, 290, 30)
GUICtrlSetFont(-1, 10)
$Button_5 = GUICtrlCreateButton("Set Minimum Credit Card Transaction Value", 70, 180, 290, 30)
GUICtrlSetFont(-1, 10)
$Label_4 = GUICtrlCreateLabel("Press a button to turn the Chip and Pin on or off", 6, 20, 430, 30)
GUICtrlSetFont(-1, 15)


GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $on

        Case $msg = $off

            Exit
            
        Case $msg = $Button_4

        Case $msg = $Button_5

        
        
    EndSelect
WEnd
Exit

Label was overlapping the buttons



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#include <GuiConstants.au3>
#include <Array.au3>
#include <File.au3>

GUICreate("Test", 430, 226, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$on = GUICtrlCreateButton("On", 50, 70, 110, 50)
GUICtrlSetFont(-1, 15)
$off = GUICtrlCreateButton("Off", 270, 70, 110, 50)
GUICtrlSetFont(-1, 15)
$Button_4 = GUICtrlCreateButton("Configure Merchant Details", 70, 140, 290, 30)
GUICtrlSetFont(-1, 10)
$Button_5 = GUICtrlCreateButton("Set Minimum Credit Card Transaction Value", 70, 180, 290, 30)
GUICtrlSetFont(-1, 10)
$Label_4 = GUICtrlCreateLabel("Press a button to turn the Chip and Pin on or off", 6, 20, 430, 30)
GUICtrlSetFont(-1, 15)
GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $on

        Case $msg = $off

            Exit
            
        Case $msg = $Button_4

        Case $msg = $Button_5

        
        
    EndSelect
WEnd
Exit

Label was overlapping the buttons

Yep, missed that one, guess I need another cup of java

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Well done.

You all passed.

Thanks for the help.

Mark

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  
Followers 0