The FiveDBU.prg in Samples references a function StyleBrowse( )
I cannot find that function anywhere. Is anyone familiar with it ?
Thanks.
Static Function StyleBrowse( oBrw )
WITH OBJECT oBrw
:l2007 := .F.
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:lFullGrid := .T.
:lRowDividerComplete := .T.
:lColDividerComplete := .T.
//:nRowDividerStyle := LINESTYLE_NOLINES
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
:nHeaderHeight := 23
//:nFooterHeight := oBrw:nHeaderHeight
:nRowHeight := oBrw:nHeaderHeight
//:nStretchCol := 1
:nFreeze := 1
if lPijama
:SetColor( CLR_BLACK, RGB( 232, 255, 232 ) )
else
:SetColor( nClrTxtBrw, nClrBackBrw )
endif
END
Return nil
Static Function StyleBrowse( oBrwSel, aBarget, aEditget, cNaam )
LOCAL hBmp := ReadBitmap( 0, "bitmaps\search.bmp" )
local cCol,cTemp
DEFAULT aBarget:={}
DEFAULT aEditget:={}
DEFAULT cNaam:=""
if lPijama // Make stripes in the browse
oBrwSel:bClrStd = { || If( oBrwSel:KeyNo() % 2 == 0, ;
{ If( ( oBrwSel:cAlias )->( Deleted() ), CLR_HRED, nClrTxtBrw ),;
CLR_BROWSE2 }, ;
{ If( ( oBrwSel:cAlias )->( Deleted() ), CLR_HRED, nClrTxtBrw ),;
CLR_BROWSE1 } ) }
oBrwSel:bClrSel = { || { If( ( oBrwSel:cAlias )->( Deleted() ), CLR_HRED, nClrBackBrw ),;
CLR_BROWSEROW } }
else
oBrwSel:bClrStd := { || { If( ( oBrwSel:cAlias )->( Deleted() ), CLR_HRED, nClrTxtBrw ),;
nClrBackBrw } }
oBrwSel:bClrSel := { || { If( ( oBrwSel:cAlias )->( Deleted() ), CLR_HRED, nClrBackBrw ),;
MY_PAARS } }
endif
cClrBack := Eval( oBrwSel:bClrSelFocus )[ 2 ] // I don't know what this is doing
oBrwSel:SetChecks()
oBrwSel:bRClickHeaders := { || XbrColSelector( oBrwSel, cNaam ) } // Kies welke velden tezien zijn
//oBrwSel:SetRecSelBmp( "set.bmp" ) // red arrow as record-selector
WITH OBJECT oBrwSel
:l2007 := .F.
:lFooter := .T.
:bRecSelHeader := {|| "Klant" }
:bRecSelData := {| o | o:KeyNo }
:bRecSelFooter := {| o | o:nLen }
:oRecSelFont := oFont // optional
:nRecSelWidth := "99999" // required size
:lColChangeNotify := .T.
:nMarqueeStyle := MARQSTYLE_HIGHLROW
//:lAllowRowSizing := .F.
//:lAllowSizings := .f.
//:lHScroll := .F.
:lFullGrid := .T.
:lMultiSelect := .T.
:lRowDividerComplete := .T.
:lColDividerComplete := .T.
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
:bClrSelFocus := {|| { CLR_WHITE, CLR_BROWSECEL } } // CUANDO TIENE EL FOCUS
:bClrRowFocus := {|| { CLR_WHITE, CLR_BROWSEROW } }
:nHeaderHeight := 23
:oHeaderFonts := oBold
:nHeadStrAligns := AL_CENTER
//:nFooterHeight := oBrwSel:nHeaderHeight
:nRowHeight := oBrwSel:nHeaderHeight
:nStretchCol := NIL // -2 // STRETCHCOL_WIDEST
:nFreeze := 1
if lPijama
:SetColor( CLR_BLACK, RGB( 232, 255, 232 ) ) // Pink
else
:SetColor( nClrTxtBrw, nClrBackBrw )
endif
END
// Toon de Bargetdata (Gets boven Bar)
oBrwSel:lGetBar := .T. // Button to activate
if len(aBarget)>0
FOR EACH cCol in aBarget
WITH OBJECT oBrwSel:oCol( cCol )
:uBarGetVal := uValBlank( :Value )
:cBarGetPic := :cEditPicture
:bClrEdit := {|| { CLR_BLACK, MY_LIGHTYELLOW } }
:lBarGetOnKey := .T. // after having setfocus the oBrowse object, the end user can insert the characters directly into the get
// :cBarGetBmp := hBmp // this for show the Bitmap on the get
:bBarGetAction := {|| ( oBrwSel:cAlias )->( MARC_SETFILTER( oBrwSel ) ) } // this for show the bitmap on the get and associated a action
// // :bBarGetAction := {|| ( oBrwSel:cAlias )->( SETFILTER( oBrwSel ) ) } // this for show the bitmap on the get and associated a action
END
NEXT
endif
*/
if len(aEditget)>0
//xbrowser(aEditget) title oBrwSel:cAlias()
FOR EACH cCol in aEditget
//msginfo(cCol+oBrwSel:cAlias(),"Info")
WITH OBJECT oBrwSel:oCol( cCol )
:nEditType := EDIT_GET
:bClrHeader := {|| { CLR_WHITE, CLR_BROWSEINDEX } }
//msginfo(cCol+oBrwSel:cAlias(),"Info Done")
END
NEXT
endif
*/
Return nil
DEFINE BUTTON OF oBar PROMPT "Import" RESOURCE "code" //;
// ACTION ( TxtStruct( oBrwParent ), oBrw:SetFocus() )
DEFINE BUTTON OF oBar PROMPT "Export" RESOURCE "edit" //;
// ACTION ( New( Alias(), cFileName ) ) //, oDlg:End() )
METHOD ExportDBF( ) CLASS MLSEditor
LOCAL cDbfFileName := SPACE(10), cDbfFullName, retval
MEMVAR cPath
MsgGet( "Name the file to create", "Export Database", @cDbfFileName )
cDbfFullName := cPath + TRIM(cDbfFileName) + ".dbf"
retval := ::oDbf:CopyTo( cDbfFullName )
RETURN NIL
// ------------------------------------------------------------------------------------------------------------
METHOD ImportDBF( ) CLASS MLSEditor
LOCAL cDbfFileName, retval
MEMVAR cPath
// Lookup the file to edit
cDbfFileName := cGetFile( "*.dbf", "Database Selector", , cPath )
retval := ::oDbf:AppendFrom( cDbfFileName )
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 45 guests