Changeset 23 for trunk/Forms


Ignore:
Timestamp:
Jun 17, 2011, 9:52:46 AM (13 years ago)
Author:
george
Message:
  • Modified: Selection form set selected item id.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UItemEdit.lfm

    r22 r23  
    11object ItemEditForm: TItemEditForm
    2   Left = 298
     2  Left = 251
    33  Height = 423
    4   Top = 125
     4  Top = 92
    55  Width = 552
    66  ActiveControl = Panel1
  • trunk/Forms/UItemSelect.pas

    r21 r23  
    2323    procedure ListView1Resize(Sender: TObject);
    2424  private
     25    function GetSelectedId: Integer;
    2526    { private declarations }
    2627  public
     
    2930    ListObject: TChronisObject;
    3031    procedure LoadList;
     32    property SelectedId: Integer read GetSelectedId;
    3133  end;
    3234
     
    5052  with TReportLine(Report[Item.Index]) do begin
    5153    Item.Caption := Items[0];
     54    Item.Data := Pointer(Id);
    5255    for I := 1 to Items.Count - 1 do
    5356    if not TReportColumn(Report.Columns[I]).VirtualItem then
     
    6265  for I := 0 to ListView1.Columns.Count - 1 do
    6366    ListView1.Columns[I].Width := ListView1.Width div ListView1.Columns.Count;
     67end;
     68
     69function TItemSelectForm.GetSelectedId: Integer;
     70begin
     71  if Assigned(ListView1.Selected) then Result := Integer(ListView1.Selected.Data)
     72    else Result := -1;
    6473end;
    6574
  • trunk/Forms/UMainForm.lfm

    r22 r23  
    11object MainForm: TMainForm
    22  Left = 271
    3   Height = 447
     3  Height = 446
    44  Top = 159
    55  Width = 640
Note: See TracChangeset for help on using the changeset viewer.