How to change !!! HEADER !!!-Fonts in xBrowse at runtime ?

How to change !!! HEADER !!!-Fonts in xBrowse at runtime ?

Postby ukoenig » 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

Image

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.

Code: Select all  Expand view
// -------- 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 :lol:
Last edited by ukoenig on Sat Aug 16, 2008 8:58 am, edited 1 time in total.
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

Postby Antonio Linares » Sat Aug 16, 2008 7:39 am

Uwe,

oBrowse:SetFont( oFont )

oBrowse:SelFont()

oColumn:oDatafont := [ oFont | codeblock ]
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Changing Header font

Postby ukoenig » Sat Aug 16, 2008 8: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.

Image

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

Regards
Uwe :lol:
Last edited by ukoenig on Sat Aug 16, 2008 9:12 am, edited 1 time in total.
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

Postby Antonio Linares » Sat Aug 16, 2008 9:09 am

oColumn:oHeaderFont := oNewFont
oBrowse:Refresh()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Changing header / footer

Postby ukoenig » Sat Aug 16, 2008 9:44 am

Thank you very much,

It works perfect now.
All together : Font and Color

Code: Select all  Expand view

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



Image

Regards
Uwe :lol:
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


Return to FiveWin for Harbour/xHarbour

Who is online

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