TTXTEDIT ReadOnly ?

TTXTEDIT ReadOnly ?

Postby MGA » Sun Mar 17, 2013 2:25 pm

Can as read only TTXTEDIT?

thanks
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: TTXTEDIT ReadOnly ?

Postby Antonio Linares » Sun Mar 17, 2013 3:58 pm

SGS,

You can easily modify Class TTxtEdit to support readonly mode:

1. Add a new DATA lReadOnly INIT .F.

2. In Method KeyChar() add:

Code: Select all  Expand view
METHOD KeyChar( nKey, nFlags ) CLASS TTxtEdit

   local cLastToken, nColor

   if Len( ::aLines ) == 0
      ::aLines = { "" }
      ::Refresh()
   endif

   if ::lReadOnly   // new !!!
       return nil
   endif

   ...
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42090
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: TTXTEDIT ReadOnly ?

Postby MGA » Sun Mar 17, 2013 7:12 pm

muito obrigado Senhor Antonio! :D
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 83 guests