View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005233 | JEDI VCL | 04 Feature Request | public | 2010-05-10 08:50 | 2012-02-29 16:55 |
Reporter | ZENsan | Assigned To | AHUser | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | 3.45 | |||
Summary | 0005233: TJvDBGrid wordwrap | ||||
Description | It will be good to add special event for DbGrid called like "OnColumnWordwrap" returning bollean if drawed column must be wordwrapped. If we allow row resizing, then really I see only OnDrawCell possibility for that or modifying source unit and then including it into project. | ||||
Tags | No tags attached. | ||||
|
Could you please provide the zipped sources of a sample application showing this? |
2010-06-08 09:29
|
JvDbGridWordWrap.zip (1,353 bytes) |
|
Hello? |
|
Thanks, someone with DB knowledge will have to look at this |
|
I just checked this issue again. So there is no problems with String Fields. If Grid.WordWrap is true, then everything goes fine. But Date fields and other fielda re not wordwrapped. That's strange... |
2010-11-23 16:46
|
|
|
That is because of: on line 3450 of JvDBGrid.pas must be this text instead of previous: if (Field.DataType in [ftString, ftWideString]) or WordWrap or (FShowMemos and ((Field.DataType in [ftMemo{$IFDEF COMPILER10_UP}, ftWideMemo{$ENDIF}]) then |
|
begin if (Field.DataType in [ftString, ftWideString]) or WordWrap or (FShowMemos and (Field.DataType in [ftMemo{$IFDEF COMPILER10_UP}, ftWideMemo{$ENDIF}])) then begin if Assigned(Field.OnGetText) then MemoText := Field.DisplayText else MemoText := Field.AsString; WriteCellText(Rect, 2, 2, MemoText, Column.Alignment, UseRightToLeftAlignmentForField(Field, Column.Alignment), False); end else DefaultDrawColumnCell(Rect, DataCol, Column, State); end; This works like a magic. |
|
before there was check only for TSrtingField... And how About all ancestors, TWideStringField and so on. I think checking datatype is quite good idea. |
|
begin if (Field.DataType in [ftString, ftWideString]) or WordWrap or (FShowMemos and (Field.DataType in [ftMemo{$IFDEF COMPILER10_UP}, ftWideMemo{$ENDIF}])) then begin if Assigned(Field.OnGetText) or not (Field.DataType in [ftString, ftWideString])then MemoText := Field.DisplayText else MemoText := Field.AsString; WriteCellText(Rect, 2, 2, MemoText, Column.Alignment, UseRightToLeftAlignmentForField(Field, Column.Alignment), False); end else DefaultDrawColumnCell(Rect, DataCol, Column, State); end; This is correction for previous post. |
|
Fixed in svn revision 12927. There is now a "WordWrapAllFields: Boolean default False" property. @ZENsan: The check for "Field is TStringField" also includes the TWideStringField because it derives from it and the is-operator handles this. |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-05-10 08:50 | ZENsan | New Issue | |
2010-06-07 13:49 | obones | Note Added: 0017452 | |
2010-06-07 13:49 | obones | Status | new => feedback |
2010-06-08 09:29 | ZENsan | File Added: JvDbGridWordWrap.zip | |
2010-07-09 14:09 | ZENsan | Note Added: 0017532 | |
2010-10-08 15:57 | obones | Note Added: 0017800 | |
2010-10-08 15:57 | obones | Status | feedback => acknowledged |
2010-11-23 16:46 | ZENsan | Note Added: 0018152 | |
2010-11-23 16:46 | ZENsan | File Added: Clipboard-1.png | |
2010-11-23 16:55 | ZENsan | Note Added: 0018153 | |
2010-11-23 16:57 | ZENsan | Note Added: 0018154 | |
2010-11-23 16:59 | ZENsan | Note Added: 0018155 | |
2010-11-24 09:10 | ZENsan | Note Added: 0018159 | |
2010-11-28 12:03 | AHUser | Note Added: 0018206 | |
2010-11-28 12:03 | AHUser | Status | acknowledged => resolved |
2010-11-28 12:03 | AHUser | Fixed in Version | => Daily / SVN |
2010-11-28 12:03 | AHUser | Resolution | open => fixed |
2010-11-28 12:03 | AHUser | Assigned To | => AHUser |
2012-02-29 16:55 | obones | Fixed in Version | Daily / SVN => 3.45 |