A xBrowse-problem using public defined fonts ?

A xBrowse-problem using public defined fonts ?

Postby ukoenig » Fri Jan 15, 2016 3: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: A xBrowse-problem using public defined fonts ?

Postby cnavarro » Fri Jan 15, 2016 4: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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: A xBrowse-problem using public defined fonts ?

Postby ukoenig » Fri Jan 15, 2016 4: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: A xBrowse-problem using public defined fonts ?

Postby cnavarro » Fri Jan 15, 2016 4: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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: A xBrowse-problem using public defined fonts ?

Postby byte-one » 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
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: A xBrowse-problem using public defined fonts ?

Postby ukoenig » Sat Jan 16, 2016 1: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 :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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: A xBrowse-problem using public defined fonts ?

Postby nageswaragunupudi » Sun Jan 17, 2016 3: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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 68 guests