Ignore:
Timestamp:
Jun 3, 2010, 6:00:52 PM (14 years ago)
Author:
george
Message:
  • Přidáno: Formulář pro vkládání položek.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UItemEdit.pas

    r4 r5  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
    9   StdCtrls, Spin, EditBtn, USqlDatabase;
     9  StdCtrls, Spin, EditBtn, USqlDatabase, MaskEdit;
    1010
    1111type
     
    128128        TEdit(NewControl).Text := Values[0].Values[Properties[I].Values['ColumnName']];
    129129        TEdit(NewControl).Width := (Width div ColumnCount) div 2 - 20;
     130      end else
     131      if ValueType = Integer(vtPassword) then begin
     132        NewControl := TMaskEdit.Create(Panel1);
     133        NewControl.Parent := Panel1;
     134        NewControl.Top := LastTop;
     135        NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2;
     136        TMaskEdit(NewControl).Width := (Width div ColumnCount) div 2 - 20;
     137      end else
     138      if ValueType = Integer(vtBoolean) then begin
     139        NewControl := TCheckBox.Create(Panel1);
     140        NewControl.Parent := Panel1;
     141        NewControl.Top := LastTop;
     142        NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2;
     143        TCheckBox(NewControl).Checked := Boolean(StrToInt(Values[0].Values[Properties[I].Values['ColumnName']]));
     144      end else begin
     145        NewControl := TEdit.Create(Panel1);
     146        NewControl.Parent := Panel1;
     147        NewControl.Top := LastTop;
     148        NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2;
     149        TEdit(NewControl).Width := (Width div ColumnCount) div 2 - 20;
     150        TEdit(NewControl).Text := Values[0].Values[Properties[I].Values['ColumnName']];
    130151      end;
    131152
Note: See TracChangeset for help on using the changeset viewer.