-
Notifications
You must be signed in to change notification settings - Fork 1
/
companiasseguros.pas
57 lines (43 loc) · 1.61 KB
/
companiasseguros.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
unit companiasseguros;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, RzListVw, rHTMLListView, Data.DB,
Vcl.ExtCtrls, RzPanel;
type
TFimagenesCompanias = class(TForm)
rzlstvw1: TRzListView;
rztlbr1: TRzToolbar;
procedure FormCreate(Sender: TObject);
procedure rzlstvw1DblClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FimagenesCompanias: TFimagenesCompanias;
implementation
{$R *.dfm}
uses seguros;
procedure TFimagenesCompanias.FormCreate(Sender: TObject);
var i:Integer; itm:TListItem;
begin
// lvr1.ItemOptionsEx.Images:=TFSeguros(Self.Owner).il1;
rzlstvw1.LargeImages:=TFSeguros(Self.Owner).il1;
for i := 0 to TFSeguros(Self.Owner).il1.Count-1 do
begin
itm:=rzlstvw1.Items.Add;
itm.ImageIndex:=i;
end;
end;
procedure TFimagenesCompanias.rzlstvw1DblClick(Sender: TObject);
begin
if not (TFSeguros(Self.Owner).fdqseguros.State in [dsEdit,dsInsert]) then TFSeguros(Self.Owner).fdqseguros.edit;
TFSeguros(Self.Owner).fdqseguros.FieldByName('img').Clear;
TFSeguros(Self.Owner).il1.GetBitmap( rzlstvw1.ItemIndex ,TFSeguros(Self.Owner).rDBImage1.Picture.Bitmap);
TFSeguros(Self.Owner).fdqseguros.FieldByName('img').Assign(TFSeguros(Self.Owner).rDBImage1.Picture.Bitmap);
TFSeguros(Self.Owner).rDBImage1.Width:=TFSeguros(Self.Owner).rDBImage1.Picture.Bitmap.Width;
TFSeguros(Self.Owner).rDBImage1.Height:=TFSeguros(Self.Owner).rDBImage1.Picture.Bitmap.Height;
end;
end.