Funktionsreferenz

_GUICtrlButton_Show

Zeigt bzw. versteckt einen Button

#Include <GuiButton.au3>
_GUICtrlButton_Show($hWnd[, $fShow = True])

 

Parameter

$hWnd Handle zu dem Control
$fShow [optional] Eines der folgenden:
 True - zeigt den Button
False - versteckt den Button

 

Rückgabewert

Erfolg: eines der folgenden:
    1 - falls der Button vorher sichtbar war
    0 - falls der Button vorher versteckt war

 

Bemerkungen

- - - - - - - - Erklärung der Controls - - - - - - - -

 

Verwandte Funktionen

 

Beispiel


#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GUIConstantsEx.au3>
#include <GuiButton.au3>
#include <WindowsConstants.au3>

Opt("MustDeclareVars", 1)

_Main()

Func _Main()
    Local $y = 70, $btn[6], $rdo[6], $chk[6]

    GUICreate("Buttons", 510, 400)
    GUISetState()

    $btn[0] = GUICtrlCreateButton("Button 1", 10, 10, 90, 50)

    $rdo[0] = GUICtrlCreateRadio("Radiobutton 1", 120, 10, 120, 25)

    $chk[0] = GUICtrlCreateCheckbox("Checkbutton 1", 260, 10, 120, 25)

    For $x = 1 To 5
        $btn[$x] = GUICtrlCreateButton("Button" & $x + 1, 10, $y, 90, 50)
        $rdo[$x] = GUICtrlCreateRadio("Radiobutton" & $x + 1, 120, $y, 120, 25)
        $chk[$x] = GUICtrlCreateCheckbox("Checkbutton" & $x + 1, 260, $y, 120, 25)
        $y += 60
    Next

    ; Versteckt die Buttons
    For $x = 0 To 5
        _GUICtrlButton_Show($btn[$x], False)
        _GUICtrlButton_Show($rdo[$x], False)
        _GUICtrlButton_Show($chk[$x], False)
        Sleep(500)
    Next

    ; Zeigt die Buttons
    For $x = 5 To 0 Step -1
        _GUICtrlButton_Show($chk[$x])
        _GUICtrlButton_Show($rdo[$x])
        _GUICtrlButton_Show($btn[$x])
        Sleep(500)
    Next

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd

    Exit
EndFunc   ;==>_Main