1. RE: Disabling Controls
- Posted by Mike <vulcan at win.co.nz> Nov 05, 2001
- 330 views
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 ) > >