Page 1 of 1

Possible, to change fonts in Buttonbar (2007) ?

Posted: Thu Mar 27, 2008 6:39 pm
by ukoenig
Hello,

I have big buttonbar-buttons and hight screen-resolutions.
The text is hard to read.
I had a look in the classes and could't see any font defines.

Is it possible to change the font-size for buttonbars ?

Regards

Uwe

Posted: Fri Mar 28, 2008 10:08 am
by Antonio Linares
Uwe,

Please search for DEFINE FONT oFont NAME "Tahoma" SIZE 0, -11 in Class TBtnBmp and modify it.

Change font in Buttonbar

Posted: Fri Mar 28, 2008 10:58 am
by ukoenig
Antonio,

thank you very much.
As a option, i will make it
in relation of the button-hight

Code: Select all

nSIZE := -11
if  ::nHeight >= 100 
    nSIZE := -16
endif
if  ::nHeight < 100 .and. ::nHeight >= 80 
    nSIZE := -15
endif
if  ::nHeight >= 50 .and. ::nHeight < 80 
    nSIZE := -12
endif
if ::oWnd:oFont != nil 
    if ::oWnd:oFont:cFaceName != "Tahoma"
       DEFINE FONT oFont NAME "Tahoma" SIZE 0, nSIZE
       ::oWnd:SetFont( oFont )
    endif   
else   
    DEFINE FONT oFont NAME "Tahoma" SIZE 0, nSIZE
    ::oWnd:SetFont( oFont )
endif   
That looks fine

Regards

Uwe :lol: [/code]