If I have a xbrowse and wish see (or edit) a Memo Field How I can Make ?
First I must see if there is a Memo Field and then iI can open a Dialog with a get ..Memo
How I can detect if on fields of xbrowse column there is or there memo fields ?
FUNCTION ChkForMemo( cAlias )
LOCAL aStru := ( cAlias )->( dbStruct() )
LOCAL lRetu := .F.
aEval( aStru, { | x | if( x[ 2 ] == "M", lRetu := .T., ) } )
RETURN ( lRetu )
How I can detect if on fields of xbrowse column there is or there memo fields ?
FUNCTION ChkForMemo( cAlias )
LOCAL aStru := ( cAlias )->( dbStruct() )
LOCAL aMemo := {}
aEval( aStru, { | x | if( x[ 2 ] == "M", aAdd( aMemo, x[ 1 ] ) , ) } )
RETURN ( aMemo )
STATIC FUNCTION VistaMemo(oBrwLook,cDbf)
Local aCampiMemoTitle:= {}
Local aCampiMemo:= ChkForMemo( cDbf )
Local oCbx,cCbx
local oGet,cnotes
IF len(aCampiMemo)>0
DEFINE DIALOG oDlg SIZE 400,200 PIXEL TITLe "Vista Memo"
@ 10,5 SAY "Tipo:" SIZE 40,10 PIXEL OF oDlg
@ 10,25 COMBOBOX oCbx VAR cCbx ITEMS aCampiMemo SIZE 80,50 PIXEL OF oDlg STYLE CBS_DROPDOWN ON CHANGE (cNotes:= GetMemo( cDbf, cCbx ), oGet:Refresh() )
@ 24,25 GET oGet VAR cNotes TEXT SIZE 80,40 PIXEL OF oDlg
ACTIVATE DIALOG oDlg center
ENDIF
RETURN NIL
STATIC FUNCTION ChkForMemo( cAlias )
LOCAL aStru := ( cAlias )->( dbStruct() )
LOCAL aMemo := {}
aEval( aStru, { | x | if( x[ 2 ] == "M", aAdd( aMemo, x[ 1 ] ) , ) } )
RETURN ( aMemo )
STATIC FUNCTION GetMemo( cDbf, cCbx )
RETURN (cDbf)->(&cCbx)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 93 guests