View Issue Details

IDProjectCategoryView StatusLast Update
0025877LazarusLCLpublic2014-04-21 20:36
ReporterZex AtillaAssigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformOSOS VersionWin7 64-bit
Product Version1.2.0Product Build 
Target Version1.2.4Fixed in Version1.3 (SVN) 
Summary0025877: TStringGrid => TitleFont => Color ignored
DescriptionWhen you set the TitleFont color to say Blue, it is ignored and instead the normal Font property is used. TitleFont should be used for drawing the header text and Font for the values.

TagsNo tags attached.
Fixed in Revision44775
LazTarget1.2.4
WidgetsetWin32/Win64
Attached Files

Relationships

has duplicate 0025882 resolvedJesus Reyes TStringGrid.TitleFont serves no purpose 
has duplicate 0025878 resolvedJesus Reyes ValueListEditor.Font refresh 

Activities

Vojtech Cihak

2014-03-17 23:29

reporter   ~0073799

I tried on Qt.
TitleFont.Color (and others like TitleFont.Style) are not ignored but the change is not applied immediately. When I change the TitleFont.Color and then I - for example - increase the width the change become visible.
The same is with TStringGrid (when Columns[] are NOT used).

Zex Atilla

2014-03-18 11:09

reporter   ~0073810

Yes, but did you start the program? You must start it.

Zex Atilla

2014-03-18 11:27

reporter   ~0073813

Last edited: 2014-03-18 11:36

View 8 revisions

Ok, after lots of trial and error, seems the problem arises from using the Color Picker inside the Object Inspector. Here's an experiment:

1. Click on ValueListEditor on your form, and in Object Inspector click on the Strings property. Enter some text for TStrings so that we have test lines that will display inside the control.

2. Change the Font.Color to clGreen. Now compile and start your app. The values are shown in green. Good.

3. Close the app. In Object Inspector click the elipsis in Font.Color and choose a cutom color that has no clSomething constant. I usually choose bright orange. Click OK in the Color Picker. Start your app. Text on screen at run time is NOT orange, but still green.

4. Close the app. You'll notice that Object Inspector shows Font.Color as orange, but run time remembers the previous color.

5. Now click the Strings property again, edit text, save it. Start the app again. Now it remembers the orange color even in run time. Somehow editing another property makes things right.

So, to resume:
- Font colors aren't saved properly when editing the Font.Color via Color Picker
- TitleFont.Color when set to clDefault becomes a copy of Font.Color (instead being clWindowText or whatever is default)

Bart Broersma

2014-03-19 13:57

developer   ~0073843

Does this happen in TValueList only, or is it a general TStringGrid problem?

Zex Atilla

2014-03-26 00:05

reporter   ~0073977

You're right, it's a general TStringGrid problem. After changing the Font.Color one must change any other property (doesn't matter which) for the first change to take effect.

Issue History

Date Modified Username Field Change
2014-03-17 22:50 Zex Atilla New Issue
2014-03-17 23:29 Vojtech Cihak Note Added: 0073799
2014-03-18 11:09 Zex Atilla Note Added: 0073810
2014-03-18 11:27 Zex Atilla Note Added: 0073813
2014-03-18 11:28 Zex Atilla Note Edited: 0073813 View Revisions
2014-03-18 11:29 Zex Atilla Note Edited: 0073813 View Revisions
2014-03-18 11:29 Zex Atilla Note Edited: 0073813 View Revisions
2014-03-18 11:30 Zex Atilla Note Edited: 0073813 View Revisions
2014-03-18 11:33 Zex Atilla Note Edited: 0073813 View Revisions
2014-03-18 11:34 Zex Atilla Note Edited: 0073813 View Revisions
2014-03-18 11:36 Zex Atilla Note Edited: 0073813 View Revisions
2014-03-18 14:36 Juha Manninen Relationship added related to 0025882
2014-03-19 13:57 Bart Broersma LazTarget => -
2014-03-19 13:57 Bart Broersma Note Added: 0073843
2014-03-19 13:57 Bart Broersma Status new => feedback
2014-03-26 00:05 Zex Atilla Note Added: 0073977
2014-03-26 00:05 Zex Atilla Status feedback => new
2014-04-04 12:56 Bart Broersma Summary ValueListEditor => TitleFont => Color ignored => TStringGrid => TitleFont => Color ignored
2014-04-15 05:01 Jesus Reyes Assigned To => Jesus Reyes
2014-04-15 05:01 Jesus Reyes Status new => assigned
2014-04-21 17:41 Jesus Reyes Fixed in Revision => 44775
2014-04-21 17:41 Jesus Reyes LazTarget - => 1.2.2
2014-04-21 17:41 Jesus Reyes Status assigned => resolved
2014-04-21 17:41 Jesus Reyes Fixed in Version => 1.3 (SVN)
2014-04-21 17:41 Jesus Reyes Resolution open => fixed
2014-04-21 17:41 Jesus Reyes Target Version => 1.2.2
2014-04-21 17:42 Jesus Reyes Relationship added has duplicate 0025878
2014-04-21 17:44 Jesus Reyes Relationship replaced has duplicate 0025882
2014-04-21 20:36 Jesus Reyes LazTarget 1.2.2 => 1.2.4
2014-04-21 20:36 Jesus Reyes Target Version 1.2.2 => 1.2.4