View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002709 | JEDI VCL | 00 JVCL Components | public | 2005-03-03 08:28 | 2005-03-17 00:13 |
Reporter | carlosw | Assigned To | jfudickar | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 BETA 2 | ||||
Target Version | Fixed in Version | 3.00 | |||
Summary | 0002709: Some tweaks for JvDynControlEngineDB | ||||
Description | 1. Use TField.DisplayWidth instead of TField.Size to calculate the width of an edit control. 2. Set ParentColor=True for an edit control with Readonly fields or Dataset | ||||
Additional Information | Fix: 1. function TJvDynControlEngineDB.CreateControlsFromDataSourceOnControl(ADataSource: TDataSource; AControl: TWinControl; AOptions: TJvCreateDBFieldsOnControlOptions): Boolean; ... ... if FieldDefaultWidth > 0 then Control.Width := FieldDefaultWidth else begin -- if ADataSource.DataSet.Fields[I].Size > 0 then -- Control.Width := -- TAccessCustomControl(AControl).Canvas.TextWidth('X') * ADataSource.DataSet.Fields[I].Size; ++ if ADataSource.DataSet.Fields[I].DisplayWidth > 0 then ++ Control.Width := ++ TAccessCustomControl(AControl).Canvas.TextWidth('X') * ADataSource.DataSet.Fields[I].DisplayWidth; ... 2. function TJvDynControlEngineDB.CreateControlsFromDataSourceOnControl(ADataSource: TDataSource; AControl: TWinControl; AOptions: TJvCreateDBFieldsOnControlOptions): Boolean; ... ... if FieldDefaultWidth > 0 then Control.Width := FieldDefaultWidth else begin ... ... end; // Use ParentColor when the field is ReadOnly ++ if ADataSource.DataSet.ReadOnly or ADataSource.DataSet.Fields[I].ReadOnly then ++ if isPublishedProp(Control, 'ParentColor') then ++ SetOrdProp(Control, 'ParentColor', Ord(True)); LabelControl := GetDynControlEngine.CreateLabelControlPanel(AControl, AControl, ... ... | ||||
Tags | No tags attached. | ||||
|
Fix for 2. should be: // Use ParentColor when the field is ReadOnly if (isPublishedProp(ADataSource.DataSet, 'ReadOnly') and (GetOrdProp(ADataSource.DataSet, 'ReadOnly') > 0)) or ADataSource.DataSEt.Fields[I].ReadOnly then if isPublishedProp(Control, 'ParentColor') then SetOrdProp(Control, 'ParentColor', Ord(True)); |
|
Both added. There are now two new options in the TJvCreateDBFieldsOnControlOptions Type for the control of the behaviours. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-03-03 08:28 | carlosw | New Issue | |
2005-03-03 08:58 | carlosw | Note Added: 0006638 | |
2005-03-04 04:12 | jfudickar | Status | new => assigned |
2005-03-04 04:12 | jfudickar | Assigned To | => jfudickar |
2005-03-13 14:12 | jfudickar | Note Added: 0006699 | |
2005-03-13 14:12 | jfudickar | Status | assigned => feedback |
2005-03-17 00:13 | jfudickar | Status | feedback => resolved |
2005-03-17 00:13 | jfudickar | Fixed in Version | => 3.00 |
2005-03-17 00:13 | jfudickar | Resolution | open => fixed |