but I'm gettting a bound array error (n=3) on selection
Can this be done if so what do I need to change
Thanks
Peter
- Code: Select all Expand view
#include "FiveWin.ch"
function Main()
LOCAL oBtn[2]
LOCAL oDlg
LOCAL lOn := {.f.,.t.}
LOCAL n
DEFINE DIALOG oDlg RESOURCE 'DIALOG1'
FOR n = 1 to 2
REDEFINE BTNBMP oBtn[n] CENTER NOBORDER UPDATE ID 4029 + n OF oDlg ;
RESOURCE IIF( lOn[n], 8002,8001 ) ACTION ( lOn[n] := ! lOn[n],::SetImages(IIF( lOn[n], 8002,8001 )),ShowStatus(lOn[n]))
NEXT
ACTIVATE DIALOG oDlg
RETURN nil
FUNCTION ShowStatus(lOn)
@ 6,1 SAY IIF(lOn,"On ","Off")
RETURN NIL