I have different on my dialog I use BTNBMP control to show name of font and sizes
cFontName := oBrowse:aArraydata[nRecord][15]
nFontSize := oBrowse:aArraydata[nRecord][16]
lUnderline := oBrowse:aArraydata[nRecord][17]
lStrikeOut := oBrowse:aArraydata[nRecord][18]
lBold := oBrowse:aArraydata[nRecord][19]
lItalic := oBrowse:aArraydata[nRecord][20]
nColorFont := oBrowse:aArraydata[nRecord][21]
@ nRow,5 BTNBMP aGet[15] OF oDlg;
PROMPT cFontName RIGHT;
SIZE 250, 23 PIXEL FLAT NOROUND
@ nRow,215 BTNBMP aGet[16] OF oDlg;
PROMPT STR(nFontSize) LEFT;
SIZE 50, 23 PIXEL FLAT NOROUND
@ nRow, 255 BUTTONBMP oBtnSel[4] RESOURCE "REP_FONT" FLAT SIZE 20, 23 OF ooDlgPIXEL ;
ACTION (aFont := ChooseFont(@cFontName,@nColorFont ),;
cFontName:=aFont[LF_FACENAME],;
nFontSize:=IF( aFont[LF_HEIGHT ]!=NIL,FontHeightInPoints( aFont[LF_HEIGHT ]),0) ,;
lBold:= IIF(aFont[LF_WEIGHT]=700,.t.,.f.) ,;
lItalic:= aFont[LF_ITALIC],;
lUnderline:=aFont[LF_UNDERLINE],;
lStrikeout:=aFont[ LF_STRIKEOUT ],;
aGet[15]:settext(cFontName),;
aGet[16]:settext(str(nFontSize)),;
aGet[15]:refresh(),;
aGet[16]:refresh())
First run ok then On modify the choosefont not take the font I save before
I sent you a minitest
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com