Jump to content


Photo

Highlight Clicked Header.


  • Please log in to reply
3 replies to this topic

#1 Speed

Speed
  • Members
  • 87 posts

Posted 28 January 2020 - 07:14 AM

I've created an application using TNextGrid that enables users to easily change the column headings of a loaded CSV file to match column names expected by a database.

 

Is there any way I can highlight a column header when it's clicked to indicate that it has been "selected"?

 

Thanks.

 

= Steve

 



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 28 January 2020 - 10:51 PM

Hello,

 

Maybe you can use OnHeaderClick event and then change color of desired header (or whole column).

 

You can change color of header if you turn off styles (themes).


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 Speed

Speed
  • Members
  • 87 posts

Posted 29 January 2020 - 09:03 AM

Hi Boki,

 

It appears that the HeaderStyle has to be set to hsFlatBorders - no other options work.

 

= Steve



#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 30 January 2020 - 03:43 PM

Hi,

 

You can also maybe use custom drawing, there is a event for custom drawing in header? These other styles are mostly derived from Windows styles and they can not be changed easily.

 

You can maybe put some kind of indicator inside custom drawing header event.


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.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users