ENABLE

From Liberty BASIC Family
Jump to navigation Jump to search
Supported in Just BASIC Supported in Liberty BASIC Not supported in Liberty BASIC 5 Not supported in Run BASIC

Description

Activates a control which has been DISABLEed.
See DISABLE

Syntax

  1. #handle.ckbx "enable"
For controls that can accept new text strings include an exclamation mark (!):
  1. #handle.btn "!enable"
See the individual Building Blocks pages for control specific information.

Hints

Place useful hints about this keyword here

Example

    nomainwin

    ' Set up a window with a disabled exit button
    ' Checking the checkbox enables the exit button
    checkbox #win.agree, "", [agree], [disagree], 10, 30, 20, 24
    statictext #win.st, "I agree to try harder!", 30, 35, 100, 20
    button #win.btn, "Thank You", [quit], UL, 10, 160

    open "Enable and Disable" for window as #win
    #win "trapclose [quit]"
    ' Disable exit button
    #win.btn "!disable"
    wait

[quit]
    close #win
    end

[agree]
    #win.agree "set"
    ' If checkbox is set, button is enabled
    #win.btn "!enable"
    wait

[disagree]
    #win.agree "reset"
    ' If checkbox is cleared, button is disabled
    #win.btn "!disable"
    wait

Useful Procedures

' Place a useful function or sub using this keyword here