Board index » delphi » TButton font colour

TButton font colour

Hi,
regardless of what colour I set the font to it still appears black on my
TButton object - any ideas? This is the code generated...

object AddNotesBtn: TButton
      Left = 544
      Top = 312
      Width = 75
      Height = 25
      Caption = 'Add Notes'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clMaroon
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
      TabOrder = 25
      OnClick = AddNotesBtnClick
    end

 

Re:TButton font colour


Standard TButton doesn't support colors. You may create own inherited
component and implement custom-drawing. As alternative, check TBitBtn or
some third-party buttons...

--
With best regards, Mike Shkolnik
EMail: mshkol...@scalabium.com
http://www.scalabium.com

"roy" <r...@sss.com> ???Y/???Y ????? ???Y??:
news:Xns92C3A06DBB004roysss@207.105.83.65...

Quote
> Hi,
> regardless of what colour I set the font to it still appears black on my
> TButton object - any ideas? This is the code generated...

> object AddNotesBtn: TButton
>       Left = 544
>       Top = 312
>       Width = 75
>       Height = 25
>       Caption = 'Add Notes'
>       Font.Charset = DEFAULT_CHARSET
>       Font.Color = clMaroon
>       Font.Height = -11
>       Font.Name = 'MS Sans Serif'
>       Font.Style = []
>       ParentFont = False
>       TabOrder = 25
>       OnClick = AddNotesBtnClick
>     end

Re:TButton font colour


Quote
roy <r...@sss.com> wrote:
>Hi,
>regardless of what colour I set the font to it still appears
>black on my TButton object - any ideas? This is the code
>generated...

[snip]

Hi Roy, Buttons are so very much part of Windows that they keep
their colors they got from Window's settings, no matter how hard
you try to give them others. Try the TBitBtn instead (on the
additional controls tab - at least it is there in C++Builder).

Re:TButton font colour


"Thorsten Kettner" <ANSWERBYthorsten.kett...@otto.de> wrote in
news:3dcfd0fb$1@newsgroups.borland.com:

Quote
> Hi Roy, Buttons are so very much part of Windows that they keep
> their colors they got from Window's settings, no matter how hard
> you try to give them others. Try the TBitBtn instead (on the
> additional controls tab - at least it is there in C++Builder).

Yep! got it in one - maybe Borland can remove that property from TButton to
stop fools like me spending time on it.

Thanks

Roy

Re:TButton font colour


Quote
"roy" <r...@sss.com> wrote in message

news:Xns92C3A1C336381roysss@207.105.83.65...

Quote
> "Thorsten Kettner" <ANSWERBYthorsten.kett...@otto.de> wrote in
> news:3dcfd0fb$1@newsgroups.borland.com:

> > Hi Roy, Buttons are so very much part of Windows that they
keep
> > their colors they got from Window's settings, no matter how
hard
> > you try to give them others. Try the TBitBtn instead (on the
> > additional controls tab - at least it is there in C++Builder).

> Yep! got it in one - maybe Borland can remove that property from
TButton to
> stop fools like me spending time on it.

Wanna test my new freeware TMWGlowBtn? It let's you choose the
fonts and colors for mouse over and normal modes as well as
providing for hot keys in the Caption. I need some feedback on it
and would really appreciate anyone willing to try it out for me.
If so, contact me via email.

--
Woody (TMW)
woody....@ih2000.net

----------------------
"I don't know the key to success, but the key to failure is to try
to please everyone."
-Bill Cosby

Re:TButton font colour


Thorsten,

standard button in MS Windows support a color changing. But in VCL thgis
feature is not supported. But anyway this is a limitation in VCL only:-( Of
course, you may create new inherited class and add custom-drawing there but
why Borland develoeprs didn't this easy task starting from Delphi 1? :-(

--
With best regards, Mike Shkolnik
EMail: mshkol...@scalabium.com
http://www.scalabium.com

"Thorsten Kettner" <ANSWERBYthorsten.kett...@otto.de> ???Y/???Y
????? ???Y??: news:3dcfd0fb$1@newsgroups.borland.com...

Quote

> roy <r...@sss.com> wrote:
> >Hi,
> >regardless of what colour I set the font to it still appears
> >black on my TButton object - any ideas? This is the code
> >generated...
> [snip]

> Hi Roy, Buttons are so very much part of Windows that they keep
> their colors they got from Window's settings, no matter how hard
> you try to give them others. Try the TBitBtn instead (on the
> additional controls tab - at least it is there in C++Builder).

Re:TButton font colour


"Mike Shkolnik" <mshkolnik2...@ukr.net> wrote in news:3dcfd2a4
@newsgroups.borland.com:

Quote
> Standard TButton doesn't support colors. You may create own inherited
> component and implement custom-drawing. As alternative, check TBitBtn or
> some third-party buttons...

TBitBtn worked fine, thanks.

Other Threads