Changeset 18 for trunk/Forms


Ignore:
Timestamp:
Jun 13, 2011, 2:41:33 PM (13 years ago)
Author:
george
Message:
  • Fixed: Do not show RelationMany items in Add and Edit form.
Location:
trunk/Forms
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UItemAdd.pas

    r15 r18  
    129129
    130130      DataType := TReportColumn(Report.Columns[I]).CustomType;
    131       NewControl := DataType.CreateControl(Panel1);
    132       DataType.SetDefault;
    133       DataType.SetupControl(NewControl);
    134       NewControl.Parent := Panel1;
    135       NewControl.Top := LastTop;
    136       NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2;
    137       NewControl.Width := (Width div ColumnCount) div 2 - 20;
    138       ControlList.Add(NewControl);
     131      if not (DataType is TDataTypeRelationMany) then begin
     132        NewControl := DataType.CreateControl(Panel1);
     133        DataType.SetDefault;
     134        DataType.SetupControl(NewControl);
     135        NewControl.Parent := Panel1;
     136        NewControl.Top := LastTop;
     137        NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2;
     138        NewControl.Width := (Width div ColumnCount) div 2 - 20;
     139        ControlList.Add(NewControl);
    139140
    140       Column := (Column + 1) mod 2;
    141       if Column = 0 then LastTop := LastTop + NewControl.Height + 4;
     141        Column := (Column + 1) mod 2;
     142        if Column = 0 then LastTop := LastTop + NewControl.Height + 4;
     143      end;
    142144    end else ControlList.Add(nil);
    143145end;
  • trunk/Forms/UItemEdit.pas

    r15 r18  
    123123  if Report.Count = 1 then
    124124    for I := 0 to Report.Columns.Count - 1 do
    125     if TReportColumn(Report.Columns[I]).ColumnName <> 'Id' then begin
     125    if (TReportColumn(Report.Columns[I]).ColumnName <> 'Id') then begin
    126126
    127127      NewLabel := TLabel.Create(Panel1);
     
    132132
    133133      DataType := TReportColumn(Report.Columns[I]).CustomType;
    134       NewControl := DataType.CreateControl(Panel1);
    135       DataType.Load(TReportLine(Report[0]).Items[I]);
    136       DataType.SetupControl(NewControl);
    137       NewControl.Parent := Panel1;
    138       NewControl.Top := LastTop;
    139       NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2;
    140       NewControl.Width := (Width div ColumnCount) div 2 - 20;
    141       ControlList.Add(NewControl);
     134      if not (DataType is TDataTypeRelationMany) then begin
     135        NewControl := DataType.CreateControl(Panel1);
     136        DataType.Load(TReportLine(Report[0]).Items[I]);
     137        DataType.SetupControl(NewControl);
     138        NewControl.Parent := Panel1;
     139        NewControl.Top := LastTop;
     140        NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2;
     141        NewControl.Width := (Width div ColumnCount) div 2 - 20;
     142        ControlList.Add(NewControl);
    142143
    143       Column := (Column + 1) mod 2;
    144       if Column = 0 then LastTop := LastTop + NewControl.Height + 4;
     144        Column := (Column + 1) mod 2;
     145        if Column = 0 then LastTop := LastTop + NewControl.Height + 4;
     146      end;
    145147   end else ControlList.Add(nil);
    146148end;
  • trunk/Forms/USettingForm.lfm

    r12 r18  
    6060    ItemHeight = 13
    6161    TabOrder = 3
    62     Text = 'ComboBoxLanguage'
    6362  end
    6463end
  • trunk/Forms/USettingForm.lrt

    r12 r18  
    44TSETTINGFORM.BUTTONCANCEL.CAPTION=Cancel
    55TSETTINGFORM.LABEL2.CAPTION=Language:
    6 TSETTINGFORM.COMBOBOXLANGUAGE.TEXT=ComboBoxLanguage
Note: See TracChangeset for help on using the changeset viewer.