Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TMS FMX UI Pack
TTMSFMXTableView: How to hide the header & footer

To hide the header / footer you can use the following code:

procedure TForm1.FormCreate(Sender: TObject); 
begin
  TMSFMXTableView1.NeedStyleLookup;
  TMSFMXTableView1.ApplyStyleLookup;
  TMSFMXTableView1.GetHeaderRectangle.Visible := False;
  TMSFMXTableView1.GetFooterRectangle.Visible := False; 
end;

To make sure the header and footer rectangle elements are created, call NeedStyleLookup and ApplyStyleLookup once. An alternative way of hiding the those elements is in the OnApplyStyleLookup event:

procedure TForm1.TMSFMXTableView1ApplyStyleLookup(Sender: TObject); 
begin
  TMSFMXTableView1.GetHeaderRectangle.Visible := False;
  TMSFMXTableView1.GetFooterRectangle.Visible := False; 
end;