TMS TDBAdvGrid – Header Font Color

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #34270
    alweis
    Participant

    I have been evaluating Alphaskins and Alphacontrols in my new application written with Delphi v12. All has worked well and the conversion has been easy. I am having a small problem with the TMS TDBAdvGrid.

    • The grid does not render at design time (not really a problem).
    • On darker skins the grid header font color is black instead of a lighter color such that the headers is very difficult to read.

    You can observe the foregoing using the WMP 2008 skin. I have looked at the skin editor and found the COLHEADER element under miscellaneous. This works as expected for the ListView but not the grid. I have not been able to discover the applicable properties for the grid. I am new to both Delphi and Alpha controls so I'm probably missing something easy. Any suggestions will be appreciated.

    I am using v 2.2.0.1 of TDBAdvGrid and the Trial version 7.26 of alpha controls under Windows XPSP3.

    #44488
    Support
    Keymaster

    Hello

    Colums fonts are not changed, because this color may be changed only in the DBAdvGrid.Columns[0].HeaderFont.Color seems.

    Maybe you know other way for fonts colors changing?

    #44526
    alweis
    Participant

    Hi Serge,

    I think I have a workaround that works for most skins. Is this a reasonably efficient way to do it?

    Code:
    procedure TTrackPro.FormCreate(Sender: TObject);
    var
    i : integer; // Loop Counter
    begin
    if sSkinManager1.Active then
    for i := 1 to DBAdvGrid1.ColCount – 1 do
    begin
    DBAdvGrid1.Columns.HeaderFont.Color :=
    sSkinProvider1.SkinData.SkinManager.GetGlobalFontColor;
    DBAdvGrid1.Columns.HeaderFont.Style := [fsbold];
    end;
    end;

    Thanks in advance for any comments or suggestions that you may have.

    #44546
    Support
    Keymaster

    Hello

    Yes, you can use this code in the sSkinManager1.OnAfterChange event.

    Color of font will be changed after each skin changing in this case.

    #44568
    alweis
    Participant

    Serge,

    Thanks for the advice, this case is closed.

    Thanx

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.