Ignore:
Timestamp:
Dec 31, 2024, 11:06:34 AM (8 days ago)
Author:
chronos
Message:
  • Fixed: Missing toolbar and context menu images in FormList form.
  • Fixed: FormList remove minimal item count limit on items remove.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/Forms/FormList.pas

    r355 r358  
    4747      Selected: Boolean);
    4848  private
     49    FImages: TImageList;
    4950    FList: TBaseItemList;
     51    procedure SetImages(AValue: TImageList);
    5052    procedure SetList(AValue: TBaseItemList);
    5153    procedure UpdateListViewColumns;
     
    5658    procedure UpdateList;
    5759    property List: TBaseItemList read FList write SetList;
     60    property Images: TImageList read FImages write SetImages;
    5861  end;
    5962
     
    264267end;
    265268
     269procedure TFormList.SetImages(AValue: TImageList);
     270begin
     271  if FImages = AValue then Exit;
     272  FImages := AValue;
     273  ToolBar1.Images := FImages;
     274  PopupMenu1.Images := FImages;
     275end;
     276
    266277procedure TFormList.UpdateListViewColumns;
    267278var
     
    293304procedure TFormList.UpdateInterface;
    294305begin
    295   ARemove.Enabled := Assigned(FList) and Assigned(ListView1.Selected) and (List.Count > MinItemCount);
     306  ARemove.Enabled := Assigned(FList) and Assigned(ListView1.Selected) and ((List.Count - ListView1.SelCount) >= MinItemCount);
    296307  AModify.Enabled := Assigned(FList) and Assigned(ListView1.Selected);
    297308  AAdd.Enabled := Assigned(FList) and ((MaxItemCount = -1) or ((MaxItemCount <> -1) and (List.Count < MaxItemCount)));
Note: See TracChangeset for help on using the changeset viewer.