Changeset 13 for trunk/Forms


Ignore:
Timestamp:
Feb 4, 2018, 12:47:01 PM (7 years ago)
Author:
chronos
Message:
  • Added: Status bar with number of contacts.
Location:
trunk/Forms
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormContacts.lfm

    r8 r13  
    77  ClientHeight = 605
    88  ClientWidth = 807
    9   DesignTimePPI = 120
    109  OnClose = FormClose
    1110  OnCreate = FormCreate
    1211  OnShow = FormShow
    13   LCLVersion = '1.8.0.6'
     12  LCLVersion = '1.8.0.4'
    1413  object ListView1: TListView
    1514    Left = 0
     
    1918    Align = alClient
    2019    Columns = <   
     20      item
     21        Caption = 'Full Name'
     22        Width = 200
     23      end   
    2124      item
    2225        Caption = 'First name'
     
    2932      item
    3033        Caption = 'Last Name'
    31         Width = 100
     34        Width = 387
    3235      end>
    3336    OwnerData = True
  • trunk/Forms/UFormContacts.pas

    r8 r13  
    6868  if Assigned(Contacts) and (Item.Index < Contacts.Count) then
    6969  with TContact(Contacts[Item.Index]) do begin
    70     Item.Caption := FirstName;
     70    Item.Caption := FullName;
     71    Item.SubItems.Add(FirstName);
    7172    Item.SubItems.Add(MiddleName);
    7273    Item.SubItems.Add(LastName);
  • trunk/Forms/UFormMain.lfm

    r8 r13  
    55  Width = 785
    66  Caption = 'FormMain'
    7   ClientHeight = 506
     7  ClientHeight = 497
    88  ClientWidth = 785
    9   DesignTimePPI = 120
    109  Menu = MainMenu1
    1110  OnClose = FormClose
     
    1312  OnCreate = FormCreate
    1413  OnShow = FormShow
    15   LCLVersion = '1.8.0.6'
     14  LCLVersion = '1.8.0.4'
    1615  object CoolBar1: TCoolBar
    1716    Left = 0
     
    3635      AnchorSideTop.Control = CoolBar1
    3736      Left = 24
    38       Height = 22
     37      Height = 28
    3938      Top = 5
    40       Width = 105
     39      Width = 132
    4140      Align = alNone
    4241      AutoSize = True
     
    5655      end
    5756      object ToolButton2: TToolButton
    58         Left = 24
     57        Left = 30
    5958        Top = 0
    6059        Action = Core.AFileOpen
     
    6362      end
    6463      object ToolButton3: TToolButton
    65         Left = 59
     64        Left = 74
    6665        Top = 0
    6766        Action = Core.AFileSave
    6867      end
    6968      object ToolButton4: TToolButton
    70         Left = 82
     69        Left = 103
    7170        Top = 0
    7271        Action = Core.AFileClose
     
    7776      AnchorSideTop.Control = CoolBar1
    7877      Left = 188
    79       Height = 22
     78      Height = 28
    8079      Top = 5
    81       Width = 24
     80      Width = 30
    8281      Align = alNone
    8382      AutoSize = True
     
    9796      end
    9897    end
     98  end
     99  object StatusBar1: TStatusBar
     100    Left = 0
     101    Height = 30
     102    Top = 467
     103    Width = 785
     104    Panels = <   
     105      item
     106        Width = 200
     107      end>
     108    SimplePanel = False
    99109  end
    100110  object MainMenu1: TMainMenu
  • trunk/Forms/UFormMain.pas

    r8 r13  
    3333    MenuItemFile: TMenuItem;
    3434    PopupMenuOpenRecent: TPopupMenu;
     35    StatusBar1: TStatusBar;
    3536    ToolBarOther: TToolBar;
    3637    ToolBarFile: TToolBar;
     
    6061
    6162uses
    62   UCore, UFormContacts;
     63  UCore, UFormContacts, UContact;
    6364
    6465resourcestring
     66  SCount = 'Count:';
    6567  SModified = 'Modified';
    6668
     
    120122  UpdateFormTitle;
    121123  CoolBar1.Visible := MenuItemToolbar.Checked;
     124  if Assigned(Core.DataFile) then
     125    StatusBar1.Panels[0].Text := SCount + ' ' + IntToStr(TcontactsFile(Core.DataFile).Contacts.Count)
     126    else StatusBar1.Panels[0].Text := '';
    122127end;
    123128
Note: See TracChangeset for help on using the changeset viewer.