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
0002709 [JEDI VCL] 00 JVCL Components minor N/A 2005-03-03 08:28 2005-03-17 00:13
Reporter carlosw View Status public  
Assigned To jfudickar
Priority normal Resolution fixed  
Status resolved   Product Version 3.00 BETA 2
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.
Attached Files

- Relationships

-  Notes
(0006638)
carlosw (reporter)
2005-03-03 08:58

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));
(0006699)
jfudickar (developer)
2005-03-13 14:12

Both added.

There are now two new options in the TJvCreateDBFieldsOnControlOptions Type for the control of the behaviours.

- Issue History
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:11 jfudickar Issue Monitored: jfudickar
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


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