How to set font color of cell without using events?
#1
Posted 14 October 2010 - 11:10 PM
I can set the background color of a cell with the TCell.Color property. There is also a TCell.FontStyle property. But how do I set the font color of a cell without using e.g. the OnCellFormatting event? I don't see a TCell.Font property or such.
Thanks,
Thomas
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
#2
Posted 14 October 2010 - 11:35 PM
Unfortunately only way is to use OnCellFormating event. I have decide to not put this property to the cell, to save on memory.
Best regards
--
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
Posted 14 October 2010 - 11:40 PM
ehm, ok. Even if just providing a TColor based property FontColor or TextColor without the entire TFont type? Pretty much the same as you are doing with FontStyle or Color or ActualFontColor etc? IMHO a bit weird that I can read the actual font color, set the background color etc. but not the cell font color directly.
Thanks,
Thomas
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
#4
Posted 15 October 2010 - 12:19 AM
I am still considering about adding this property to the Cell, but I am not yet decided.
I know that these days memory is cheap, but I like to keep grid lite.
Best regards
--
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.
#5
Posted 15 October 2010 - 12:36 AM
Adding such a property would be much appreciated! ;-)
To elaborate on why I think it would be useful. After adding a row and its column values, I run code to adjust coloring and formatting depending on columns values. While I could use the events for that, from my understanding, these events get called A LOT, thus when running perhaps a bit of lengthy code in these events will slow-down displaying the grid A LOT as well. Thus, I thought applying coloring/formatting rules on cells after adding the row only ONCE would be a great win. It is for the background cell color and the font styles! The only missing piece to avoid the OnCellFormatting event is to have a direct way to set the text color. ;-)
Thanks,
Thomas
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
#6
Posted 15 October 2010 - 12:54 AM
I will need to think a little bit more. I understand your concerns.
Best regards
--
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.
#7
Posted 15 October 2010 - 10:01 AM
+1
Just an idea, but you could add custom cell formatting dynamically. While the default value is nil, there shouldn't be a difference in speed and memory usage. When a value (pointer to TOptionalCellFormatting or whatsoever) is assigned, the custom cell formattings are applied.
BTW, I often use the TNxHtmlColumn for custom cell text color and formattings and never had a performance or memory problem with that
#8
Posted 16 October 2010 - 07:15 PM
I have decide to add TextColor property to the Cell.
It will be ready for next release.
Best regards
--
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.
#9
Posted 16 October 2010 - 07:22 PM
Thomas
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
#10
Posted 23 November 2010 - 12:35 AM
any time-frame when a new release with this enhancement will be available?
Thanks,
Thomas
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
#11
Posted 27 November 2010 - 03:10 AM
If you want, I may send you development release to test it.
Best regards
--
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.
#12
Posted 28 November 2010 - 04:55 PM
thanks for the offer. Much appreciated!
The thing is, we are pretty close releasing a new version of our product and I don't want to include an "untested" NextGrid release into the codebase that late. In respect to cell coloring. Have there been a lot of changes needed for that request in your code? If not, perhaps you can provide me with the necessary changes, so that I can incorporate the changes into my used 5.2.5 public release?
If this is too much work for you to provide me with the necessary changes, I can wait for the next release. No problem!
Thanks,
Thomas
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
#13
Posted 29 November 2010 - 12:55 AM
I will send you PM
Best regards
--
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.
#14
Posted 29 November 2010 - 10:43 AM
cause the RowVisible property wasn't in your grid implementation available, I simply merged your TextColor changes into my V5.2.5 release and this works like a charm!
Thanks a lot!!!
Thomas
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and NexusDB V2
Upscene Productions: http://www.upscene.com
My blog: http://blog.upscene.com/thomas/
#15
Posted 16 October 2011 - 12:43 AM
I also appreciate this coloring-feature without events. Unfortunately I can't find the "Grid.Cell[x,y].Textcolor" - property in the current version of the NextSuite. Where can I find the property? Thank you in advance...
Michael
#16
Posted 16 October 2011 - 02:25 AM
TextColor is here for several releases. Maybe you are using some older version which don't have this property included.
I recommend downloading latest release.
--
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.
#17
Posted 16 October 2011 - 10:51 AM
Michael
#18
Posted 16 October 2011 - 08:02 PM
--
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.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users