Jump to content

Disappearing Buttons Version 3.1.1.114


Recommended Posts

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

Link to comment
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.

 

Link to comment
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


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

Link to comment
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.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...