FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to change !!! HEADER !!!-Fonts in xBrowse at runtime ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
How to change !!! HEADER !!!-Fonts in xBrowse at runtime ?
Posted: Fri Aug 15, 2008 11:11 PM
Hello,

I finished the work on the xbrowse-tools ( page 1 )
for Header and Footer

The download for this version :
http://www.pflegeplus.com/fw_downloads/xbrowsetest.zip



There is still one little problem :
changing with the PAINT-Button fonts at runtime.

The Test-browser is painted on the main-dialog.
The settings are done in a folder-page.
---------------------------------------------

The Button < PAINT > calls this function.
Everything works, only the font ( size and color ) i couldn't change

After solving this problem, i can do the download for the forum.

// -------- PAINT BROWSER  called from button < PAINT > --------------

FUNCTION PAINT_BROWSE(oLbx0)

// Working ( values from color-selections and sliders )
// -----------------------------------------------------------
oLbx0:bClrGrad := { | lInvert | If( ! lInvert, ;
{ { nMOVE1, BR_COLOR1, BR_COLOR2 }, ;
{ nMOVE1,BR_COLOR2,BR_COLOR1 } }, ;
{ { nMOVE2,BR_COLOR3,BR_COLOR2 }, ;
{ nMOVE2,BR_COLOR2,BR_COLOR3 } } ) }

// Working ( value from slider )
// ---------------------------------
oLbx0:nHeaderHeight := BRWHEADER

// Working ( value from slider )
// ----------------------------------
oLbx0:nFooterHeight := BRWFOOTER		

// NOT working (some tests)
// ------------------------------
oBrwFont:End()
oBrwFont  := TFont():New("Arial", ,-18,.F.,.F. , , , ,.F. )
oLbx0:oFont := oBrwFont    // new Font

oLbx0:bClrHeader := { || { 128, 0 } }   // new Color RED

// new color, using a var from collection
// --------------------------------------------
* oLbx0:bClrHeader := { || { BR_TCOLOR, 0 } }  

oLbx0:Refresh()

RETURN( NIL )


Any solution for this ?

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: 44162
Joined: Thu Oct 06, 2005 05:47 PM
How to change !!! HEADER !!!-Fonts in xBrowse at runtime ?
Posted: Sat Aug 16, 2008 07:39 AM

Uwe,

oBrowse:SetFont( oFont )

oBrowse:SelFont()

oColumn:oDatafont := [ oFont | codeblock ]

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Changing Header font
Posted: Sat Aug 16, 2008 08:52 AM
Thank you very much for the infos.

To change the fonts of datalines is working.
I have to use it in folder-pages 2 and 3 ( cell-design )
My problem : on page < 1 >, i have to change the HEADER-font.
Setting a font, changes only the data.

I can show the result in a new dialog, there it works.
Because each folder-page has to show something different to the
browser, i don't want to change the focus to a extra dialog.



I will still have a look at my tools, i have done some month ago.
Maybe i can find something.

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: 44162
Joined: Thu Oct 06, 2005 05:47 PM
How to change !!! HEADER !!!-Fonts in xBrowse at runtime ?
Posted: Sat Aug 16, 2008 09:09 AM

oColumn:oHeaderFont := oNewFont
oBrowse:Refresh()

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Changing header / footer
Posted: Sat Aug 16, 2008 09:44 AM
Thank you very much,

It works perfect now.
All together : Font and Color

oBrwFont  := TFont():New("Arial", ,-18,.F.,.F. , , , ,.F. )

WITH OBJECT oLbx0:oCol( "Text 1" )  // changes a defined column
      :oHeaderFont := oBrwFont 
      :oFooterFont := oBrwFont 
      :bClrHeader := { || {  65535, 0 } }  // Yellow
      :bClrFooter := { || { 1 65535, 0 } }   // Yellow
END




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.

Continue the discussion