Jump to content


Photo

TNxButton6: Unable to Change Font Color.


  • Please log in to reply
2 replies to this topic

#1 Speed

Speed
  • Members
  • 190 posts
  • Gender:Male

Posted 30 May 2016 - 09:34 AM

I add a TNxButton6 to a form:

 

  • StyleOptions: []
  • Style: stUserDefined
  • BorderSize: 1
  • BorderColor: clWhite
  • Color: $00A97313
  • Font: Color: clWhite

All of the properties change the appearance of the button except the Font Color.  Even though I have set its color to clWhite, it's still black.

 

= Steve

 

Attached Files



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 30 May 2016 - 11:31 AM

Hi,

Replace first lines of TNxButton6.PaintContent (NxCollection6.pas file):

  with Canvas do
  begin
    Font.Assign(Self.Font);

    if not Enabled
      then Font.Color := clGrayText;

// changes begin
    case Style of
      stModern: ;
      stNative: Font.Color := TNxButtonStyle6.GetTextColor(Self, Font.Color, FState);
    end;
// changes end

    if HasIcon then
I hope that it helps, it will be also included in next release.

To have it work in design-time, you will need to recompile packages.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Speed

Speed
  • Members
  • 190 posts
  • Gender:Male

Posted 30 May 2016 - 12:08 PM

Perfect.  Thank you.






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users