Changeset 346 for trunk/Forms


Ignore:
Timestamp:
Dec 25, 2024, 11:04:56 AM (4 weeks ago)
Author:
chronos
Message:
  • Fixed: Build on Linux.
  • Modified: Improved internal code structure.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormItem.pas

    r344 r346  
    8080  J: Integer;
    8181  Control: TControl;
    82   ReferenceList: TItemList<TItem>;
     82  ReferenceList: IList<TItem>;
    8383  ReferenceItem: TItem;
    8484begin
     
    106106      try
    107107        TComboBox(Control).Items.Clear;
    108         ReferenceList := TItemList<TItem>(Item.GetReferenceList(Index));
     108        ReferenceList := Item.GetReferenceList(Index);
    109109        if Assigned(ReferenceList) then
    110110          for J := 0 to ReferenceList.Count - 1 do
  • trunk/Forms/FormList.lfm

    r320 r346  
    11object FormList: TFormList
    22  Left = 1040
    3   Height = 360
     3  Height = 312
    44  Top = 540
    5   Width = 480
     5  Width = 417
    66  Caption = 'List'
    7   ClientHeight = 360
    8   ClientWidth = 480
    9   DesignTimePPI = 144
     7  ClientHeight = 312
     8  ClientWidth = 417
     9  DesignTimePPI = 125
    1010  OnCreate = FormCreate
     11  OnDestroy = FormDestroy
    1112  OnShow = FormShow
    12   LCLVersion = '3.4.0.0'
     13  LCLVersion = '3.6.0.0'
    1314  object ListView1: TListView
    1415    Left = 0
    15     Height = 322
     16    Height = 279
    1617    Top = 0
    17     Width = 480
     18    Width = 417
    1819    Align = alClient
    1920    Columns = <   
    2021      item
    2122        Caption = 'Name'
    22         Width = 466
     23        Width = 405
    2324      end>
    2425    MultiSelect = True
     
    3940  object ToolBar1: TToolBar
    4041    Left = 0
    41     Height = 38
    42     Top = 322
    43     Width = 480
     42    Height = 33
     43    Top = 279
     44    Width = 417
    4445    Align = alBottom
    4546    Images = Core.ImageListSmall
     
    5455    end
    5556    object ToolButton2: TToolButton
    56       Left = 36
     57      Left = 31
    5758      Top = 2
    5859      Action = AModify
    5960    end
    6061    object ToolButton3: TToolButton
    61       Left = 71
     62      Left = 61
    6263      Top = 2
    6364      Action = ARemove
    6465    end
    6566    object ToolButton4: TToolButton
    66       Left = 106
     67      Left = 91
    6768      Top = 2
    6869      Action = AClone
     
    7172  object ActionList1: TActionList
    7273    Images = Core.ImageListSmall
    73     Left = 208
    74     Top = 163
     74    Left = 181
     75    Top = 141
    7576    object AAdd: TAction
    7677      Caption = 'Add'
     
    101102  object PopupMenu1: TPopupMenu
    102103    Images = Core.ImageListSmall
    103     Left = 352
    104     Top = 160
     104    Left = 306
     105    Top = 139
    105106    object MenuItem1: TMenuItem
    106107      Action = AAdd
  • trunk/Forms/FormList.pas

    r344 r346  
    3535    procedure ASelectAllExecute(Sender: TObject);
    3636    procedure FormCreate(Sender: TObject);
     37    procedure FormDestroy(Sender: TObject);
    3738    procedure FormShow(Sender: TObject);
    3839    procedure ListView1CustomDrawSubItem(Sender: TCustomListView;
     
    182183end;
    183184
     185procedure TFormList.FormDestroy(Sender: TObject);
     186begin
     187  List := nil;
     188end;
     189
    184190procedure TFormList.FormShow(Sender: TObject);
    185191begin
     
    254260  if FList = AValue then Exit;
    255261  FList := AValue;
     262  UpdateInterface;
     263  UpdateList;
    256264end;
    257265
Note: See TracChangeset for help on using the changeset viewer.