Xbrowse : bEditWhen

Xbrowse : bEditWhen

Postby Franklin Demont » Sun Feb 10, 2013 9:34 am

Hello ,

Code: Select all  Expand view

:oCol("Type"):nEditType      := EDIT_GET_LISTBOX
:oCol("Type"):aEditListTxt   := {"Numeric","Character","Logical","Date","Memo"}
:oCol("Type"):aEditListBound := {"N","C","L","D","M"}
:oCol("Type"):bEditWhen      := {|oGet|ASCAN(aOld,{|a|a[1]==oBrw:aRow[1]})==0 }
 


The when clausule works not on the combobox , we can select a item and change the input field !

FWH 12.03

Frank
test
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: Xbrowse : bEditWhen

Postby nageswaragunupudi » Mon Feb 11, 2013 3:41 am

Thanks for pointing out. Please apply this fix.

Please locate the following lines in the METHOD PostEdit
Code: Select all  Expand view
     case ::nEditType == EDIT_LISTBOX

           if xValue != nil
              Eval( ::bOnPostEdit, Self, xValue, If( ::oEditLbx != nil, ::oEditLbx:nLastKey, 0 ) )
              nLastKey   := If( ::oEditLbx != nil, ::oEditLbx:nLastKey, 0 )
              lGoNext    := ( nLastKey == VK_RETURN )
           endif
 

Please replace with:
Code: Select all  Expand view
     case ::nEditType == EDIT_LISTBOX

           if xValue != nil
              if lDirectAssign .or. ::bEditWhen == nil .or. Eval( ::bEditWhen, Self )  // inserted now
                 Eval( ::bOnPostEdit, Self, xValue, If( ::oEditLbx != nil, ::oEditLbx:nLastKey, 0 ) )
              endif // inserted now
              nLastKey   := If( ::oEditLbx != nil, ::oEditLbx:nLastKey, 0 )
              lGoNext    := ( nLastKey == VK_RETURN )
           endif
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

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