Funktionreferenz


_GUICtrlButton_Show

Beschreibung anzeigen in

Zeigt bzw. versteckt einen Button

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

Parameter

$hWnd Control-ID / Handle des Controls
$bShow [optional] Eines der folgenden:
    True - zeigt den Button
    False - versteckt den Button

Rückgabewert

Gibt eines der folgenden zurück:
    1 - falls der Button vorher sichtbar war
    0 - falls der Button vorher versteckt war

Bemerkungen

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

Beispiel

#include <GuiButton.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
    Local $y = 70, $a_idBtn[6], $a_idRdo[6], $a_idChk[6]

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

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

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

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

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

    ; Versteckt die Buttons
    For $x = 0 To 5
        _GUICtrlButton_Show($a_idBtn[$x], False)
        _GUICtrlButton_Show($a_idRdo[$x], False)
        _GUICtrlButton_Show($a_idChk[$x], False)
        Sleep(500)
    Next

    ; Zeigt die Buttons
    For $x = 5 To 0 Step -1
        _GUICtrlButton_Show($a_idChk[$x])
        _GUICtrlButton_Show($a_idRdo[$x])
        _GUICtrlButton_Show($a_idBtn[$x])
        Sleep(500)
    Next

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

    Exit
EndFunc   ;==>Example