Changeset 100 for trunk/Forms


Ignore:
Timestamp:
Aug 31, 2016, 9:57:15 AM (8 years ago)
Author:
chronos
Message:
  • Added: Resize ListView filter column width according ListView column width.
  • Fixed: Row height in ListView to respect visual styles.
Location:
trunk/Forms
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormAcronyms.lfm

    r85 r100  
    5353  object StatusBar1: TStatusBar
    5454    Left = 0
    55     Height = 28
    56     Top = 530
     55    Height = 24
     56    Top = 534
    5757    Width = 740
    5858    Panels = <   
     
    6868    Left = 0
    6969    Height = 26
    70     Top = 504
     70    Top = 508
    7171    Width = 740
    7272    Align = alBottom
     
    9696    OnCompareItem = ListViewSort1CompareItem
    9797    OnFilter = ListViewSort1Filter
     98    OnColumnWidthChanged = ListViewSort1ColumnWidthChanged
    9899    Column = 0
    99100    Order = soUp
  • trunk/Forms/UFormAcronyms.pas

    r97 r100  
    4545      Selected: Boolean);
    4646    procedure ListViewFilter1Change(Sender: TObject);
     47    procedure ListViewSort1ColumnWidthChanged(Sender: TObject);
    4748    function ListViewSort1CompareItem(Item1, Item2: TObject): Integer;
    4849    procedure ListViewSort1Filter(ListViewSort: TListViewSort);
     
    235236end;
    236237
     238procedure TFormAcronyms.ListViewSort1ColumnWidthChanged(Sender: TObject);
     239begin
     240  ListViewFilter1.UpdateFromListView(ListViewAcronyms);
     241end;
     242
    237243function TFormAcronyms.ListViewSort1CompareItem(Item1, Item2: TObject): Integer;
    238244begin
  • trunk/Forms/UFormImportSources.lfm

    r85 r100  
    307307    OnCompareItem = ListViewSort1CompareItem
    308308    OnFilter = ListViewSort1Filter
     309    OnColumnWidthChanged = ListViewSort1ColumnWidthChanged
    309310    Column = 0
    310311    Order = soNone
  • trunk/Forms/UFormImportSources.pas

    r97 r100  
    5656      Selected: Boolean);
    5757    procedure ListViewFilter1Change(Sender: TObject);
     58    procedure ListViewSort1ColumnWidthChanged(Sender: TObject);
    5859    function ListViewSort1CompareItem(Item1, Item2: TObject): Integer;
    5960    procedure ListViewSort1Filter(ListViewSort: TListViewSort);
     
    128129end;
    129130
     131procedure TFormImportSources.ListViewSort1ColumnWidthChanged(Sender: TObject);
     132begin
     133  ListViewFilter1.UpdateFromListView(ListView1);
     134end;
     135
    130136function TFormImportSources.ListViewSort1CompareItem(Item1, Item2: TObject
    131137  ): Integer;
     
    235241var
    236242  NewImportSource: TImportSource;
    237   I: Integer;
    238243begin
    239244  if Assigned(ListView1.Selected) then begin
  • trunk/Forms/UFormMain.lfm

    r97 r100  
    11object FormMain: TFormMain
    2   Left = 603
     2  Left = 454
    33  Height = 446
    4   Top = 342
     4  Top = 401
    55  Width = 782
    66  Caption = 'Acronym Decoder'
    7   ClientHeight = 421
     7  ClientHeight = 422
    88  ClientWidth = 782
    99  Menu = MainMenu1
     
    1717  object Panel1: TPanel
    1818    Left = 0
    19     Height = 395
     19    Height = 396
    2020    Top = 26
    2121    Width = 782
    2222    Align = alClient
    2323    BevelOuter = bvNone
    24     ClientHeight = 395
     24    ClientHeight = 396
    2525    ClientWidth = 782
    2626    TabOrder = 1
    2727    object CheckBoxExactMath: TCheckBox
    2828      Left = 8
    29       Height = 24
     29      Height = 21
    3030      Top = 3
    31       Width = 104
     31      Width = 102
    3232      Caption = 'Exact match'
    3333      OnChange = CheckBoxExactMathChange
     
    4444    object ListViewAcronyms: TListView
    4545      Left = 8
    46       Height = 323
     46      Height = 324
    4747      Top = 64
    4848      Width = 767
     
    14341434    OnCompareItem = ListViewSort1CompareItem
    14351435    OnFilter = ListViewSort1Filter
     1436    OnColumnWidthChanged = ListViewSort1ColumnWidthChanged
    14361437    Column = 0
    14371438    Order = soUp
  • trunk/Forms/UFormMain.pas

    r98 r100  
    116116      Selected: Boolean);
    117117    procedure ListViewFilter1Change(Sender: TObject);
     118    procedure ListViewSort1ColumnWidthChanged(Sender: TObject);
    118119    function ListViewSort1CompareItem(Item1, Item2: TObject): Integer;
    119120    procedure ListViewSort1Filter(ListViewSort: TListViewSort);
     
    452453begin
    453454  UpdateAcronymsList;
     455end;
     456
     457procedure TFormMain.ListViewSort1ColumnWidthChanged(Sender: TObject);
     458begin
     459  ListViewFilter1.UpdateFromListView(ListViewAcronyms);
    454460end;
    455461
Note: See TracChangeset for help on using the changeset viewer.