Changeset 23 for trunk/Forms/UItemSelect.pas
- Timestamp:
- Jun 17, 2011, 9:52:46 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UItemSelect.pas
r21 r23 23 23 procedure ListView1Resize(Sender: TObject); 24 24 private 25 function GetSelectedId: Integer; 25 26 { private declarations } 26 27 public … … 29 30 ListObject: TChronisObject; 30 31 procedure LoadList; 32 property SelectedId: Integer read GetSelectedId; 31 33 end; 32 34 … … 50 52 with TReportLine(Report[Item.Index]) do begin 51 53 Item.Caption := Items[0]; 54 Item.Data := Pointer(Id); 52 55 for I := 1 to Items.Count - 1 do 53 56 if not TReportColumn(Report.Columns[I]).VirtualItem then … … 62 65 for I := 0 to ListView1.Columns.Count - 1 do 63 66 ListView1.Columns[I].Width := ListView1.Width div ListView1.Columns.Count; 67 end; 68 69 function TItemSelectForm.GetSelectedId: Integer; 70 begin 71 if Assigned(ListView1.Selected) then Result := Integer(ListView1.Selected.Data) 72 else Result := -1; 64 73 end; 65 74
Note:
See TracChangeset
for help on using the changeset viewer.