Jump to content


TNxButton.color does not seem to work in Delphi 7


  • Please log in to reply
3 replies to this topic

#1 Alfred

Alfred
  • Members
  • 13 posts
  • Gender:Male
  • Location:UK

Posted 23 May 2012 - 09:37 AM

Clearly, there is something I am not doing right. I make a form, put a TNxPanel on it, put a TNxButton on the panel, try to change the color property - to no avail. I also tried doing it in the form's OnShow event. I have the latest version Nextcomps5_412.exe

Suggestions please!

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 6,686 posts
  • Gender:Male

Posted 23 May 2012 - 11:15 AM

Hi,

Try to set AdaptiveColors to False.

I hope that it helps.
boki@bergsoft.net
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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 Alfred

Alfred
  • Members
  • 13 posts
  • Gender:Male
  • Location:UK

Posted 23 May 2012 - 01:25 PM

I tried putting the button on the form and on the TNxPanel as you can see below - the color property belonging to the nxpanel was changed as advised, but it didn't change anything. I could not find AdaptiveColors on the TNxButton, only on the panel. Both buttons here remained clBtnFace

object Form1: TForm1
  Left = 284
  Top = 107
  Width = 1305
  Height = 675
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object NxPanel1: TNxPanel
    Left = 0
    Top = 608
    Width = 1297
    Height = 40
    AdaptiveColors = False
    Align = alBottom
    Caption = 'NxPanel1'
    Color = clMoneyGreen
    UseDockManager = False
    ParentBackground = False
    ParentColor = False
    TabOrder = 0
    object NxButton1: TNxButton
  Left = 216
  Top = 8
  Width = 75
  Caption = 'NxButton1'
  Color = clFuchsia
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clRed
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  ParentColor = False
  ParentFont = False
  TabOrder = 0
  Transparent = True
    end
  end
  object NxButton2: TNxButton
    Left = 216
    Top = 8
    Width = 75
    Caption = 'NxButton2'
    Color = 16744448
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clRed
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = []
    ParentColor = False
    ParentFont = False
    TabOrder = 1
    Transparent = True
  end
end

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 6,686 posts
  • Gender:Male

Posted 24 May 2012 - 05:55 AM

Hi,

TNxButton is drawn with using standard Windows themes. It doesn't support any other colors.
boki@bergsoft.net
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users