to be sure, nothing strange is included
I added the fonts to sample [b:1dpdrui6]< metrptst.prg >[/b:1dpdrui6] with the same results
title and buttonfonts are the same
[img:1dpdrui6]http://www.pflegeplus.com/IMAGES/MetroB7.jpg[/img:1dpdrui6]
from original sample :
function Main( cParam )
local oWnd, oBar, oMetro, oBrush
local cTitle := "Start"
SET DATE ITALIAN
SET CENTURY ON
// added
[color=#0000FF:1dpdrui6]DEFINE FONT oFontLarge NAME "Arial" SIZE 0, -50 BOLD
DEFINE FONT oFontSmall NAME "Arial" SIZE 0, -16 BOLD
DEFINE FONT oFontTiny NAME "Arial" SIZE 0, -12 BOLD[/color:1dpdrui6]
...
...
static function MakeMetroPanel( oWnd )
local oMetro, oBtn
DEFINE METROPANEL oMetro OF oWnd TITLE "Start" ;
COLOR CLR_WHITE, CLR_GREEN ;
ON CLICK oWnd:End()
oMetro:lDesignMode := .t.
// added
[color=#0000FF:1dpdrui6]oMetro:oFont:End()
oMetro:oFont := oFontLarge // Title
oMetro:oBtnFont:End()
oMetro:oBtnFont := oFontTiny // Button
oMetro:oTextFont:End()
oMetro:oTextFont := oFontSmall // Button[/color:1dpdrui6]
// the buttons :
DEFINE METROBUTTON oBtn OF oMetro ;
....
....
....
any idea what could be wrong ?
----------------
----------------
[b:1dpdrui6]it works using ( NO logfile-writings ) adding 2 lines :[/b:1dpdrui6]
[color=#0000FF:1dpdrui6]FONT oFontSmall ;[/color:1dpdrui6]
[color=#0000FF:1dpdrui6]TEXTFONT oFontTiny ;[/color:1dpdrui6]
[img:1dpdrui6]http://www.pflegeplus.com/IMAGES/Metrob8.jpg[/img:1dpdrui6]
// keeping :
oPanel1:oFont := oFontLarge // Title
// not needed !!!
//oPanel1:oBtnFont:End()
//oPanel1:oBtnFont := oFontTiny // Button
//oPanel1:oTextFont:End()
//oPanel1:oTextFont := oFontSmall // Button
DEFINE METROBUTTON oBtn OF oMetro ;
COLOR CLR_HBLUE,CLR_WHITE ;
[color=#0000FF:1dpdrui6]FONT oFontSmall ;[/color:1dpdrui6]
CAPTION "Metro" ;
ALIGN "MIDDLECENTER" ;
BITMAP "..\bitmaps\fivetech3.bmp" ;
BMPALIGN "BOTTOMLEFT" ;
SIZE 50, 50 ;
BODYTEXT "FiveWin Power" ;
TEXTALIGN "BOTTOMRIGHT" ;
[color=#0000FF:1dpdrui6]TEXTFONT oFontTiny ;[/color:1dpdrui6]
BACKGROUND "..\bitmaps\fiveback.bmp" ;
LARGE
oBtn:nClrCaption := CLR_HRED
regards
Uwe
↧