Unit 'MUIClass.List' Package
[Overview][Types][Classes][Index] [#MUIClass]

TMUIList.Title

Specify a title for the current list.

Declaration

Source position: MUIClass.List.pas line 123

published property TMUIList.Title : string
  read FTitle
  write SetTitle;

Description

The title is displayed at the very first line and doesn't scroll away when the list top position moves.

Usually, the title is just a string. However, if you have a multi column list with a custom display hook and you want to have seperate titles for each of your columns, you can set this attribute to #1. In this case, whenever MUI feels that the list title has to be drawn, it will call your display hook with a nil entry pointer. Your hook has to check for this nil entry and fill the given string array with your column titles. Layout of the column titles follows the same rules as layout of the lists entries.

Example:

// display function for a multi columned file list with titles
procedure TMyWindow.DisplayEvent(Sender: Objectint: PPChar; Entry: PChar);
var
  E: PEntry;
begin
  if Assigned(Entry) then
  begin
    ToPrint[0] := E^.Name;
    ToPrint[1] := E^.Size;
    ToPrint[2] := E^.Date;
    ToPrint[3] := E^.Time;
    ToPrint[4] := E^.Flags;
    ToPrint[5] := E^.Comment;
  end
  else
  begin
    ToPrint[0] := 'Name';
    ToPrint[1] := 'Size';
    ToPrint[2] := 'Date';
    ToPrint[3] := 'Time';
    ToPrint[4] := 'Flags';
    ToPrint[5] := 'Comment';
  end;
end;

See also

OnDisplay

  

Define what should be printed in a list row


Documentation generated on: 2024-04-18