on a xbrowse I use
:nEditTypes := EDIT_GET
the user can insert numbers But I wish the use can insert only number of two digit from 1 to 90
How I can resolve ?
:bEditValid := {| oGet | if(oGet:value > 0 .and. oGet:value < 91,.t.,(MsgInfo("Solo 0 a 90"),.f.)) }
cmsoft wrote:Puedes usar bEditValid
- Code: Select all Expand view
:bEditValid := {| oGet | if(oGet:value > 0 .and. oGet:value < 91,.t.,(MsgInfo("Solo 0 a 90"),.f.)) }
For n=1 to len(oBrw:aCols)
oBrw:aCols[n]:bEditValid := {| oGet | if(oGet:value >= 0 .and. oGet:value < 91,.t.,;
(MsgInfo("Solo da 0 a 90"),.f.)) }
END
But it must erase the edit
#include "fivewin.ch"
function Main()
local aData := Array( 10, 10 )
AEval( aData, { |aRow| AFill( aRow, 0 ) } )
XBROWSER aData FASTEDIT SHOW RECID SETUP ( ;
oBrw:bEditValues := { |x,o| If( x == nil, o:oBrw:aRow[ o:nCreationOrder ], ;
If( x >= 0 .and. x < 91, o:oBrw:aRow[ o:nCreationOrder ] := x, nil ) ) }, ;
oBrw:cEditPictures := "@Z 99" ;
)
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 83 guests