Changeset 15 for trunk/Forms


Ignore:
Timestamp:
Nov 15, 2012, 12:34:33 PM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Doplněno zobrazení formuláře pro úpravu všech tabulek docházky.
Location:
trunk/Forms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormEdit.lfm

    r10 r15  
    11object FormEdit: TFormEdit
    2   Left = 383
     2  Left = 368
    33  Height = 341
    44  Top = 172
    5   Width = 538
     5  Width = 553
    66  Caption = 'Edit item'
    77  ClientHeight = 341
    8   ClientWidth = 538
     8  ClientWidth = 553
    99  OnCreate = FormCreate
    1010  OnDestroy = FormDestroy
    1111  LCLVersion = '1.1'
    1212  object ButtonOk: TButton
    13     Left = 456
     13    Left = 471
    1414    Height = 25
    1515    Top = 305
     
    2121  end
    2222  object ButtonCancel: TButton
    23     Left = 368
     23    Left = 383
    2424    Height = 25
    2525    Top = 305
     
    3434    Height = 2
    3535    Top = 297
    36     Width = 523
     36    Width = 538
    3737    Anchors = [akLeft, akRight, akBottom]
    3838  end
    3939  object PanelControls: TPanel
    40     Left = 4
    41     Height = 473
    42     Top = 4
    43     Width = 530
     40    Left = 0
     41    Height = 290
     42    Top = 0
     43    Width = 553
    4444    Align = alTop
    4545    Anchors = [akTop, akLeft, akRight, akBottom]
    46     BorderSpacing.Around = 4
    4746    BevelOuter = bvNone
    4847    TabOrder = 2
  • trunk/Forms/UFormEdit.pas

    r10 r15  
    4848    ButtonOk: TButton;
    4949    ButtonCancel: TButton;
     50    CalcEdit1: TCalcEdit;
    5051    PanelControls: TPanel;
    5152    procedure FormCreate(Sender: TObject);
     
    244245      NewControl := TDateEdit.Create(Self);
    245246      NewControl.Parent := PanelControls;
    246       TDateEdit(NewControl).Date := MySQLStrToFloat(Values.Values[Name]);
    247       NewControl.SetBounds(Rect.Left * W, Rect.Top * H,
    248        (Rect.Right - Rect.Left) * W - 28, (Rect.Bottom - Rect.Top) * H);
     247      TDateEdit(NewControl).Date := SQLToDateTime(Values.Values[Name]);
     248      NewControl.SetBounds(Rect.Left * W, Rect.Top * H,
     249       (Rect.Right - Rect.Left) * W - TEditButton(NewControl).Button.Width, (Rect.Bottom - Rect.Top) * H);
    249250      NewControl.Show;
    250251    end else
     
    252253      NewControl := TEdit.Create(Self);
    253254      NewControl.Parent := PanelControls;
    254       TEdit(NewControl).Text := TimeToStr(MySQLStrToFloat(Values.Values[Name]));
     255      TEdit(NewControl).Text := TimeToStr(SQLToTime(Values.Values[Name]));
    255256      NewControl.SetBounds(Rect.Left * W, Rect.Top * H,
    256257       (Rect.Right - Rect.Left) * W, (Rect.Bottom - Rect.Top) * H);
     
    258259    end else
    259260    if ControlType = ctReference then begin
    260       NewControl := TEdit.Create(Self);
    261       NewControl.Parent := PanelControls;
    262       TEdit(NewControl).Text := Values.Values[Name];
    263       NewControl.SetBounds(Rect.Left * W, Rect.Top * H,
    264        (Rect.Right - Rect.Left) * W - 28, (Rect.Bottom - Rect.Top) * H);
    265       NewControl.Show;
    266       NewControl := TBitBtn.Create(Self);
    267       NewControl.Parent := PanelControls;
    268       TBitBtn(NewControl).Caption := '';
    269       NewControl.SetBounds(Rect.Right * W - 28, Rect.Top * H, 24, 24);
    270       FormMain.ImageList1.GetBitmap(4, TBitBtn(NewControl).Glyph);
     261      NewControl := TEditButton.Create(Self);
     262      NewControl.Parent := PanelControls;
     263      TEditButton(NewControl).Text := Values.Values[Name];
     264      FormMain.ImageList1.GetBitmap(4, TEditButton(NewControl).Glyph);
     265      NewControl.SetBounds(Rect.Left * W, Rect.Top * H,
     266       (Rect.Right - Rect.Left) * W - TEditButton(NewControl).Button.Width,
     267       (Rect.Bottom - Rect.Top) * H);
    271268      NewControl.Show;
    272269    end;
Note: See TracChangeset for help on using the changeset viewer.