Hi Bill.
You can try the following -
Override the setaccessreadonly method with -
IF NOT This.lReadOnlyIgnore
This.lReadOnly = .F.
This.Enabled = .T.
ENDIF
Override the KeyPress method with -
LPARAMETERS nKeyCode, nShiftAltCtrl
LOCAL lnAccess
IF TYPE('goApp.oSecurityMgr') = 'O'
lnAccess = goApp.oSecurityMgr.GetAccess(This.iControlId)
IF lnAccess = ACCESS_READONLY AND !INLIST(nKeyCode, 5, 24)
NODEFAULT
RETURN
ENDIF
ENDIF
RETURN DODEFAULT(nKeyCode, nShiftAltCtrl)
Override the GotFocus method with -
IF TYPE('goApp.oMenu.oEditPad') = "O"
goApp.oMenu.oEditPad.Enabled = .f.
ENDIF
RETURN DODEFAULT()
Override the LostFocus method with -
IF TYPE('goApp.oMenu.oEditPad') = "O"
goApp.oMenu.oEditPad.Enabled = .t.
ENDIF
RETURN DODEFAULT()
This hasn't been fully tested <g>. It would probably also be best to just subclass the ceditbox control and add a property to it to hold the oEditPad.Enabled status and set it back in the LostFocus instead of hard coding like I did. Also, make sure your form's include file is set to framewrk.h or the ACCESS_READONLY won't be recognized. I think this would be a great enhancement to the framework. (Kevin, you out there?).
Let me know what you think...
Dan
>Is it possible to have security on an editbox set to readonly and still have it scrollable? If so how?
>
>TIA
>
>Bill