>Hi everybody,
>
>Is where a way to set certain fields in a Browse window to be ReadOnly without enumerating each of the fields?, Say, all fields like *ID should be Read-Only...
>
>Thanks in advance.
Hi Nadya,
You could use this approach:
USE myTable
DO BROWSEA
BROWSE NAME ob NOWAIT
FOR i = 1 TO ob.COLUMNCOUNT
IF UPPER(RIGHT(FIELD(m.i),2)) = "ID"
ob.COLUMNS(i).READONLY = .T.
ENDIF
ENDFOR
This is based on idea from BROWSEX.PRG which (I believe) belongs to Christof Lange.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison