Enable and Disable a Control


NoMainWin
enabled=1 'button is enabled to start
Button #1.b, "Change",[change],UL,10,10
Button #1.c, "I Can Change",[say],UL,10,50
Open "Test" For Window As #1

Wait
[say]
    Notice, "I am enabled."
    Wait

[change]
    if enabled then
        #1.c "!disable"
    else
        #1.c "!enable"
    end if
    enabled = not(enabled)  'toggle enabled flag
    Wait

Home

Source Code

Utilities

Internet

Games

Graphics

Media Demos

Snippets

DLL's

API Resources

Freeware

LB 4 Companion

Mastering LB 3

LB Workshop

Game Workshop

Links

Index