1. RE: Disabling Controls

Hi Evan,
Firstly the line declaring MyLText is missing a comma
Secondly use onClick instead of onChange

vulcan at win.co.nz

Evan Marshall wrote:
> Why won't this work?
> ------------------------------------------
> include win32lib.ew
> 
> constant
> MainWindow = create( Window, "Window", 0, 0, 0, 400, 300, 0 ),
> MyCheckBox = create( CheckBox, "", MainWindow, 10, 10, 10, 10, 0 ),
> MyEditText = create( EditText,"",MainWindow, 10, 25, 100, 20, 0),
> MyLText = create( LText,"Words go here", MainWindow, 110, 28 100, 20, 0 
> )
> 
> 
> procedure IsItChecked()
> integer BoxIsChecked
> BoxIsChecked = isChecked( MyCheckBox )
> if (BoxIsChecked) then
> 	setEnable( {MyEditText, MyLText},1)
> else	
> 	setEnable( {MyEditText,MyLText},0)
> end if
> end procedure
> 
> 
> onChange[MyCheckBox] = routine_id( "IsItChecked" ) 
> 
> WinMain( MainWindow, Normal )
> 
>

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu