FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour change a font on line
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
change a font on line
Posted: Wed Feb 08, 2017 11:22 PM
I must change a font of a say on line

But I not Know How make it

I made a combo with all font

LOCAL hDC := GetDC( oWnd:hWnd )

aFonts := ASort( GetFontNames( hDC ) )

ReleaseDC( oWnd:hWnd, hDC )

@ .27, 1.8 COMBOBOX oFonts VAR cFont ITEMS aFonts ;
SIZE 170, 100 FONT oFont ;
MESSAGE "Changes the font of the selection" ;
OF oBar1

@ .38, 23.5 GET oSize VAR nSize OF oBar1 ;
FONT oFont SIZE 20, 19 ;
PICTURE "99" SPINNER MIN 6 MAX 99 ;
MESSAGE "Changes the font size of the selection"

oFonts:bChange := { || WndChild():SetFont( oFonts:varget() ), ;
WndChild():SetFocus() }


the WndChild() function return the oControl SAY active ( lactive) on dialog
it make error because not found hfont

how I can change the font ( cfontname and sizes ) of the say ?
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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: change a font on line
Posted: Thu Feb 09, 2017 10:59 AM

Silvio,

Please provide complete self contained PRGs as examples, not just portions of the code

so we can quickly copy and build them

thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: change a font on line
Posted: Thu Feb 09, 2017 11:13 AM
Antonio,

I think my tool, I created some times ago includes many solutions.
A fontselect can display the text on a window or say.
The fontstring can be saved / loaded to / from a dbf.
It doesn't matter if You load a font from a DBF, Combo or Fontselector.



best regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: change a font on line
Posted: Thu Feb 09, 2017 12:22 PM

perhaps it not is need for the moment , I found another solution ...seems

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

Continue the discussion