Mr. Rao,
another test with some changes filling the 1 record with the vars from the INI-file
after the DBF is created ( still the same result ) all other fields are working fine.
Fieldname
MTITLE ( Panel-title )
The Download of the DBF
http://www.pflegeplus.com/fw_downloads/Binary.zip
Creating the new TEMPLATE-dbf and uses the INI to fill the 1. record :
[Windows]
Style=2
1.Color=16443068
2.Color=10899511
GradPos=0.2
Graddirect=.T.
Brush=BluStone.Bmp
Image=Fantasy2.Jpg
[Panel]
Text=Test Title // shows <binary> in xbrowse
Color=65535
Button=120
Caption=TFont():New("@Batang",,-24,.F.,.T.,,,,.T. )
Body=TFont():New("@Gulim",,-16,.F.,.T.,,,,.F. )
Title=TFont():New("Arial",,-24,.F.,.F. ,,,,.F.)
STATIC FUNCTION NEW_DBF()
LOCAL DBFARRAY := {}
AADD(DBFARRAY, { "PROJECT",   "C", 3, 0 })
AADD(DBFARRAY, { "MSTYLE",     "N", 1, 0 })
AADD(DBFARRAY, { "MCOLORF",   "N", 8, 0 })
AADD(DBFARRAY, { "MCOLORB",   "N", 8, 0 })
AADD(DBFARRAY, { "MGRADP",       "N", 5, 2 })
AADD(DBFARRAY, { "MGRADD",       "L", 1, 0 })
AADD(DBFARRAY, { "MBRUSH",     "C", 50, 0 })
AADD(DBFARRAY, { "MIMAGE",     "C", 50, 0 })
AADD(DBFARRAY, { "MTITLE",     "C", 40, 0 })
AADD(DBFARRAY, { "MBTNSIZE",    "N", 3, 0 })
AADD(DBFARRAY, { "MTFONT",     "C", 50, 0 })
AADD(DBFARRAY, { "MTCOLOR",   "N", 8, 0 })
AADD(DBFARRAY, { "CFONT",      "C", 50, 0 })
AADD(DBFARRAY, { "BFONT",      "C", 50, 0 })
// Creates the SAME Var-name and adds a Value to the vars like : COLORF_1, COLORF_2 ......
// this way < 494 > Fields are created
I := 1
FOR I := 1 TO 30 // 30 Buttons created
  xxx := "_" + ALLTRIM(STR(I))
  AADD(DBFARRAY, { "COLORF" + xxx,  "N", 8, 0 })
  AADD(DBFARRAY, { "COLORB" + xxx,  "N", 8, 0 })
  AADD(DBFARRAY, { "CAPTION" + xxx,  "C", 50, 0 })
  AADD(DBFARRAY, { "CAPTCOL" + xxx,  "C", 20, 0 })
  AADD(DBFARRAY, { "ALIGN" + xxx,   "C", 12, 0 })
  AADD(DBFARRAY, { "GROUP" + xxx,   "N", 2, 0 })
  AADD(DBFARRAY, { "BITMAP" + xxx,      "C", 30, 0 })
  AADD(DBFARRAY, { "BMPAL" + xxx,     "C", 12, 0 })
  AADD(DBFARRAY, { "SIZEW" + xxx,   "N", 4, 0 })
  AADD(DBFARRAY, { "SIZEH" + xxx,   "N", 4, 0 })
  AADD(DBFARRAY, { "BODYTXT" + xxx,  "C", 50, 0 })
  AADD(DBFARRAY, { "TXTALGN" + xxx,  "C", 12, 0 })
  AADD(DBFARRAY, { "BACKGRD" + xxx,  "C", 20, 0 })
  AADD(DBFARRAY, { "LARGE" + xxx,   "C", 5, 0 })
  AADD(DBFARRAY, { "MENU" + xxx,   "C", 4, 0 })
  AADD(DBFARRAY, { "ACTION" + xxx,    "C", 6, 0 })
NEXT
cDbfName := c_Path + "\TEMPLATES.DBF"
DELETE FILE &cDbfName
IF LEN(DBFARRAY) == 0
  MsgInfo( "DBF Structure-Error", "New Structure" )
  RETURN NIL
ENDIF
DBCREATE( cDbfName, DBFARRAY )
IF File( cDbfName )
  MsgInfo( "New DBF created ! ( " + ALLTRIM(STR(LEN(DBFARRAY))) + " Fields )", "New Structure" )
ELSE
  MsgAlert( "New Project-File not created !","Project-File")
ENDIF
DBSELECTAREA( 1 )
NET_USE (c_Path + "\TEMPLATES.DBF", 3,5,.T.) Â
// Appends 10 Records
// the 1. record is filled with vars from INI-file
I := 1
FOR I := 1 TO 10
  xxx := LTRIM(STR(I))
  NET_APPEND ( 3, 3 )
  IF NET_RLOCK( 5, 5 )
    IF I = 1
      (1)->MSTYLE := nMStyle
      (1)->MCOLORF := nMColorF
      (1)->MCOLORB := nMColorB
      (1)->MGRADP := nMGradpos
      (1)->MGRADD := lMDirect
      (1)->MBRUSH := cMBrush
      (1)->MIMAGE := cMImage
      (1)->MTITLE := cPText // the <binary> Text !!!
      (1)->MBTNSIZE := nPButton
      (1)->MTFONT := cPTFont
      (1)->MTCOLOR := nMTColor
      (1)->CFONT := cPCFont
      (1)->BFONT := cPBFont
    ENDIF
    IF I < 10
      (1)->PROJECT := " " + xxx
    ELSE
      (1)->PROJECT := xxx
    ENDIF
    COMMIT
    NET_ULOCK()
  ENDIF
NEXT
NET_CLOSE ( 3,5,.T.)
RETURN NIL
I can save and restore Metro-styles to / from a DBF
There is still my font-problem. to create a font from a DBF-field
The preview of the first record shows, that the Panel-title is ok no < binary>
Best Regards
Uwe
