FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour change font for TXBrowse()
Posts: 33
Joined: Sat Jul 07, 2007 05:53 PM
change font for TXBrowse()
Posted: Sun Sep 02, 2007 11:27 AM

Hi,

I am trying to change font in XBrowse, allowing the user to change it in runtime. In listbox I did:

oBrowse:Selfont()
oBrowse:Refresh()

But It does not work. Also I have tried:

LOCAL oFont

DEFINE FONT oFont FROM USER

oBrowse:Setfont(oFont)
oBrowse:Refresh()

and it does not work too. How can i do it?. Thank you!!!!

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
change font for TXBrowse()
Posted: Mon Sep 03, 2007 05:18 PM

Local oFont

DEFINE FONT oFont NAME "Arial" SIZE 0, -8 BOLD

...

oCol := oBrw:AddCol()
oCol:bStrData := { || _FIELD->First}
oCol:cHeader := "First"
oCol:oDataFont := oFont

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 33
Joined: Sat Jul 07, 2007 05:53 PM
change font for TXBrowse()
Posted: Mon Sep 03, 2007 05:35 PM

Thanks, but I want that the user can change the font during the program execution.

Posts: 33
Joined: Sat Jul 07, 2007 05:53 PM
change font for TXBrowse()
Posted: Wed Sep 05, 2007 11:57 AM

Please, any advice!!!!!!!!!!. Thank you.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
change font for TXBrowse()
Posted: Wed Sep 05, 2007 03:48 PM

Edu,

We are going to build a sample for you

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
change font for TXBrowse()
Posted: Thu Sep 06, 2007 09:29 AM
Edu,

Please add this new method to Class TXBrowse:
METHOD SelFont() CLASS TXBrowse

   local oFont, n

   DEFINE FONT oFont FROM USER
   
   for n = 1 to Len( ::aCols )
      ::aCols[ n ]:oDataFont = oFont
   next
   
   ::Refresh()
   
return nil

Then simply do:
oXBrowse:SelFont()
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion