Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001665 [JEDI VCL] 00 JVCL Components minor always 2004-04-18 13:49 2004-04-22 23:42
Reporter Musswohl View Status public  
Assigned To user72
Priority normal Resolution fixed  
Status resolved   Product Version
Summary 0001665: TJvDBGrid - font problem with first fixed column
Description Having different font styles in titel (titel font) and grid (font) and using fixed columns: the first fixed column has the same font style as the titel and not the font style of the grid.
Additional Information
Tags No tags attached.
Attached Files jpg file icon fontproblem.JPG [^] (8,952 bytes) 2004-04-18 13:49

- Relationships

-  Notes
(0003940)
user72
2004-04-18 23:10

I can't reproduce this. Which version of JvDBGrid do you have?
(0003945)
fbc (reporter)
2004-04-19 00:59

Hi Peter,
I can reproduce it with latest DBGrid version.
Apart from fixed columns and a changed Titlefont, you must also have multiselect true.
So I can see it, but I don't know hot to fix it :-)
regards
Flemming
(0003957)
Musswohl (reporter)
2004-04-19 09:58

// $Id: JvDBGrid.pas,v 1.46 2004/04/15 17:21:25 peter3 Exp $

object JvDBGrid1: TJvDBGrid
  Left = 8
  Top = 64
  Width = 672
  Height = 269
  Color = clScrollBar
  DataSource = DataSource1
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Arial'
  Font.Style = []
  Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
  ParentFont = False
  TabOrder = 2
  TitleFont.Charset = DEFAULT_CHARSET
  TitleFont.Color = clWindowText
  TitleFont.Height = -15
  TitleFont.Name = 'Arial'
  TitleFont.Style = []
  FixedCols = 1
end

Please note that in my case multiselect is false.
The problem only occurs when the application is started (not in the preview).
(0003989)
user72
2004-04-22 00:47

This might fix it. Change the beginning of DrawCell to:

begin
// if gdFixed in AState then
// Canvas.Brush.Color := FixedColor;
  FCurrentDrawRow := ARow;
  Canvas.Font := Self.Font;
  if (DataLink <> nil) and DataLink.Active and (ACol >= 0) and
    (ACol < Columns.Count) then
  begin
    DrawColumn := Columns[ACol];
    if DrawColumn <> nil then
      Canvas.Font := DrawColumn.Font;
  end;
  

  inherited DrawCell(ACol, ARow, ARect, AState);
...
(0004014)
Musswohl (reporter)
2004-04-22 09:58

That fixes the bug.

Thanks.
(0004021)
user72
2004-04-22 23:42

Updated in CVS

- Issue History
Date Modified Username Field Change
2004-04-18 13:49 Musswohl New Issue
2004-04-18 13:49 Musswohl File Added: fontproblem.JPG
2004-04-18 14:05 Musswohl Issue Monitored: Musswohl
2004-04-18 23:10 user72 Note Added: 0003940
2004-04-18 23:11 user72 Status new => assigned
2004-04-18 23:11 user72 Assigned To => user72
2004-04-19 00:27 user72 Status assigned => feedback
2004-04-19 00:59 fbc Note Added: 0003945
2004-04-19 09:58 Musswohl Note Added: 0003957
2004-04-22 00:47 user72 Note Added: 0003989
2004-04-22 09:58 Musswohl Note Added: 0004014
2004-04-22 23:42 user72 Status feedback => resolved
2004-04-22 23:42 user72 Resolution open => fixed
2004-04-22 23:42 user72 Note Added: 0004021


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker