View Issue Details

IDProjectCategoryView StatusLast Update
0001665JEDI VCL00 JVCL Componentspublic2004-04-22 23:42
ReporterMusswohlAssigned Touser72 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001665: TJvDBGrid - font problem with first fixed column
DescriptionHaving 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.
TagsNo tags attached.

Activities

2004-04-18 13:49

 

fontproblem.JPG (8,952 bytes)
fontproblem.JPG (8,952 bytes)

user72

2004-04-18 23:10

  ~0003940

I can't reproduce this. Which version of JvDBGrid do you have?

fbc

2004-04-19 00:59

reporter   ~0003945

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

Musswohl

2004-04-19 09:58

reporter   ~0003957

// $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).

user72

2004-04-22 00:47

  ~0003989

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);
...

Musswohl

2004-04-22 09:58

reporter   ~0004014

That fixes the bug.

Thanks.

user72

2004-04-22 23:42

  ~0004021

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 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