FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour A xBrowse-problem using public defined fonts ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

A xBrowse-problem using public defined fonts ?

Posted: Fri Jan 15, 2016 03:53 PM
Hello,

I noticed a problem using PUBLIC defined fonts in xbrowse.

oBrw:oFont := oSysFont1

the following happens

1. oSysFont1 is defined as PUBLIC
2. using this font in xBrowse, it seems the font is closed as well leaving the dialog.
3. After that, everywhere this font is shown as systemfont

Creating a extra font for xBrowse, there is no problem

any idea ?

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: 6755
Joined: Wed Feb 15, 2012 08:25 PM

Re: A xBrowse-problem using public defined fonts ?

Posted: Fri Jan 15, 2016 04:10 PM
Uwe

You are tried? oBrw:SetFont( oSysFont1 )
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

Re: A xBrowse-problem using public defined fonts ?

Posted: Fri Jan 15, 2016 04:25 PM

Cristobal,

Thank You very much.
it seems to be OK

as well it doesn' happen using

oCol:oDataFont := oSysfont1
oCol:oHeaderFont := oSysfont1

best regards
Uwe :D

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: 6755
Joined: Wed Feb 15, 2012 08:25 PM

Re: A xBrowse-problem using public defined fonts ?

Posted: Fri Jan 15, 2016 04:44 PM
We should not assigned to control the font like this:

oCtrl:oFont := oNewFont

so it is correct

oCtrl:SetFont( oNewFont )
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM

Re: A xBrowse-problem using public defined fonts ?

Posted: Sat Jan 16, 2016 10:55 AM

I had also the problem! ::setfont() is the solution! :D
Uwe, how do you assign the font with setfont() to oCol:oHeaderfont??

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

Re: A xBrowse-problem using public defined fonts ?

Posted: Sat Jan 16, 2016 01:00 PM
Günther,

in sample TestXbr5.prg oHeaderfont is defined like

WITH OBJECT oBrw:oCol( "Age" )
:oHeaderFont := oVFont // defined font of a selected column
:cHeader := "Age Of Employee"
:AddBmpFile( '..\bitmaps\attach.bmp' )
:nHeadBmpNo := 1
END

that was the reason I used : oBrw:oFont := oSysFont1

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: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: A xBrowse-problem using public defined fonts ?

Posted: Sun Jan 17, 2016 03:23 PM

oCol: .... fonts are to be simply assigned.

eg: oCol:xxxfont := oMyFont

We need to release the font after done with.

This is the thumb-rule:
For controls use oCtrl:SetFont( oFont )
for other classes, use oObj:oFont := oMyFont

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion