ich bin gerade dabei den Sourcecode in Bezug auf Speicherauslastung zu überprüfen. Dabei bin ich auf ein Problem gestoßen bei dem ich nicht weiterkomme. Ich habe ganz am Anfang eine PUBLIC Variable definiert mit den Presentation-Parameter für das DCBROWSE.
Code: Alles auswählen
// Font für das Browse
PUBLIC gcBrowseFont := "10.Courier New"
PUBLIC gaBrowPres := { ;
{ XBP_PP_COL_DA_BGCLR, GRA_CLR_BACKGROUND },; /* Row BG Color { 102, 0 }*/
{ XBP_PP_COL_DA_ROWHEIGHT, 13 },; /* Row Height { 107, 10 }*/
{ XBP_PP_COL_HA_HEIGHT, 10 },; /* Header Height { 122, 10 }*/
{ XBP_PP_COL_FA_HEIGHT, 10 },; /* Footer Height { 129, 10 }*/
{ XBP_PP_COMPOUNDNAME, gcBrowseFont };
}
Code: Alles auswählen
@ 1,1 DCBROWSE oBrowse DATA aArray ;
SIZE 30, 8 ;
CURSORMODE XBPBRW_CURSOR_ROW ;
FIT ;
PRESENTATION gaBrowPres ;
NOHSCROLL ;
PREEVAL {|o| o:xbpBrowse:adjustHeight := .T.} ;
ID "BROWSE" ;
POINTER n
Inhalt vorher:
Code: Alles auswählen
{{102, -2}, {107, 13}, {122, 10}, {129, 10}, {15, "10.Courier New"}}
Code: Alles auswählen
{{102, -2}, {107, 13}, {122, 10}, {129, 10}, {15, "10.Courier New"}, {105, "10.Courier New"}}
Code: Alles auswählen
LOCAL aBrowPres := { ;
{ XBP_PP_COL_DA_BGCLR, GRA_CLR_BACKGROUND },; /* Row BG Color { 102, 0 }*/
{ XBP_PP_COL_DA_ROWHEIGHT, 13 },; /* Row Height { 107, 10 }*/
{ XBP_PP_COL_HA_HEIGHT, 10 },; /* Header Height { 122, 10 }*/
{ XBP_PP_COL_FA_HEIGHT, 10 },; /* Footer Height { 129, 10 }*/
{ XBP_PP_COMPOUNDNAME, gcBrowseFont };
}
@ 1,1 DCBROWSE oBrowse DATA aArray ;
SIZE 30, 8 ;
CURSORMODE XBPBRW_CURSOR_ROW ;
FIT ;
PRESENTATION aBrowPres ;
NOHSCROLL ;
PREEVAL {|o| o:xbpBrowse:adjustHeight := .T.} ;
ID "BROWSE" ;
POINTER n
XBP_PP_COMPOUNDNAME hat den Wert 15 in der Include Datei.
In dem Quellcode von Roger habe ich im PRG-File _dcxbrow.prg im Verzeichnis \source\dclipx folgenden Code gefunden:
Code: Alles auswählen
xFont := aGetListItem[cGETLIST_FONT]
IF !Empty(xFont)
IF Valtype(xFont) == 'B'
xFont := Eval(xFont)
ENDIF
DC_PresAdd( aArray, { XBP_PP_COMPOUNDNAME, xFont } )
ENDIF
Damit man das auch "Live" sehen kann, habe ich ein kleines Demoprogramm beigefügt.