Jump to content


Photo

Cannot set my color in TNxHTMLColumn6

TNxHTMLColumn6 color

  • Please log in to reply
2 replies to this topic

#1 Sakhalin

Sakhalin
  • Members
  • 3 posts

Posted 20 March 2025 - 04:06 PM

Hi Boki,
 
please advise what I do wrong when try to set the color of a part of the cell content (S2) in TNxHTMLColumn6?
 
none of the codes below work:
 
Nx.Cells[0,k]:=S1+' '+'<span style="color: #0f00ff;">'+S2+'</span>';
Nx.Cells[0,k]:=S1+' '+'<span class="red-bold">'+S2+'</span>';
Nx.Cells[0,k]:=S1+' '+'<font color="#0000ff">'+S2+'</font>';
 
Bolt style works if use <strong> but color doesn't.
 
Should I do some settings before that?
I sure I am missing something simple.
Use Delphi12.
 
Thanks
Evgeny


#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 21 March 2025 - 10:50 PM

Hello,

 

I think that the best approach is to set it like class="myclass" and then simply attach NxStylesheets component to the column.

 

Then you will be able to modify colors from a central place.


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 Sakhalin

Sakhalin
  • Members
  • 3 posts

Posted 25 March 2025 - 06:57 PM

Thank you, it works! :-)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users