Jump to content


Photo

HeaderStyle


  • Please log in to reply
3 replies to this topic

#1 bosjo

bosjo
  • Members
  • 75 posts
  • Gender:Male
  • Location:Märsta, Sweden

Posted 15 May 2021 - 05:09 PM

When I had to change OS to Win10 a few months ago (my computer died, so I had to get a new one) I was appalled to see that NextGrids headers were rendered in a very ugly way by the OS; however, this was easily fixed by changing the HeaderStyle. But I have now added a TNextGrid6 to a new project, and I cannot find an easy way of styling the headers. What am I missing?



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,986 posts
  • Gender:Male

Posted 15 May 2021 - 06:47 PM

Hi Bosjo,

 

Can you please attach a screenshot here to show me the issue. There are now Style property, but not sure if this is what you need.


boki@bergsoft.net | LinkedIn Profile
--
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 bosjo

bosjo
  • Members
  • 75 posts
  • Gender:Male
  • Location:Märsta, Sweden

Posted 15 May 2021 - 07:58 PM

Hi boki,

 

I added two images, one with a version 5 grid with HeaderStyle set to something non-ugly, and the other with the version 6 grid with a header that is not much of a header at all... I would like to have something similar to the version 5 grid, if possible.

 

/bosjo

 

Attached Files

  • Attached File  v5.png   23.7KB   0 downloads
  • Attached File  v6.png   56.98KB   0 downloads


#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,986 posts
  • Gender:Male

Posted 15 May 2021 - 10:42 PM

Hi Bosjo,

 

I understand now. This was an old style based on Office 2007 that was popular back in the days. Now mostly flat design is popular. I can return gradient style in some of the upcoming updates though.

 

I removed it from the list, but you can make it by yourself with next event. You also need to set up YourColumn.Header.DrawingOptions to turn on doCustom and turn off doBackground flags.

procedure TForm1.NextGrid61CustomDrawHeader(Sender: TObject;
  Index: Integer; HeaderRect: TRect; HeaderState: TNxButtonState);
begin
// Here you examine HeaderState and depending on state draw your own header
end;

boki@bergsoft.net | LinkedIn Profile
--
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