Class TrHTMLListView

Unit

Declaration

type TrHTMLListView = class(TCustomListView)

Description

TrHTMLListView is enhanced ListView with multiline HTML text and definable size, colors and alignment of items

Hierarchy

  • TCustomListView
  • TrHTMLListView

Overview

Methods

Public procedure InitLoadingItems(ClearItems: boolean = false);
Public function GetHTMLItem(ItemIndex: integer): TrHTMLListItem;
Public function AddHTMLItem(HTMLText, HintText: string; ImageIndex: integer = -1): TrHTMLListItem;
Public function AddHTMLItemData(HTMLText, HintText: string; ItemBitmap: TBitmap; ItemID, ItemVarData: variant; ItemObject: TObject): TrHTMLListItem;
Public procedure UpdateHTMLItem(ItemIndex: integer; HTMLText, HintText: string);
Public procedure UpdateHTMLItemData(ItemIndex: integer; ItemBitmap: TBitmap; ItemID, ItemVarData: variant; ItemObject: TObject);
Public procedure CompareEvent(Sender: TObject; Item1, Item2: TListItem; Data: integer; var Compare: integer);
Public procedure DrawFrame(ACanvas: TCanvas; var R: TRect; FrameType: TFrameType; aColor: TColor);
Public procedure DrawThemeBk(ACanvas: TCanvas; R: TRect; State: TCustomDrawState);
Public procedure LoadFileList(FilePath, FileMask: string; HtmlTextMask: string = ''; SortByFileName: boolean = false; LoadImages: boolean = false);
Public function LoadFileImages(LoadAllItems: boolean = false; LoadSelected: boolean = false): boolean;
Public procedure LoadDBList(Dataset: TDataset; KeyField, ImageField: TField; HtmlTextMask: string = ''; HintTextMask: string = ''; LoadImages: boolean = false);
Public function LoadDBImages(Dataset: TDataset; KeyField, ImageField: TField; LoadAllItems: boolean = false; LoadSelected: boolean = false): boolean;

Properties

Published property Action;
Published property Align;
Published property AllocBy;
Published property Anchors;
Published property BevelEdges;
Published property BevelInner;
Published property BevelOuter;
Published property BevelKind default bkNone;
Published property BevelWidth;
Published property BiDiMode;
Published property BorderStyle;
Published property BorderWidth;
Published property Color;
Published property Columns;
Published property ColumnClick;
Published property Constraints;
Published property Ctl3D;
Published property DoubleBuffered;
Published property DragCursor;
Published property DragKind;
Published property DragMode;
Published property Enabled;
Published property Font;
Published property FlatScrollBars;
Published property FullDrag;
Published property GridLines;
Published property HideSelection;
Published property HotTrack;
Published property HotTrackStyles;
Published property HoverTime;
Published property IconOptions;
Published property Items;
Published property MultiSelect;
Published property OwnerData;
Published property OwnerDraw;
Published property ReadOnly default false;
Published property RowSelect;
Published property ParentBiDiMode;
Published property ParentColor default false;
Published property ParentDoubleBuffered;
Published property ParentFont;
Published property ParentShowHint;
Published property PopupMenu;
Published property ShowColumnHeaders;
Published property ShowWorkAreas;
Published property ShowHint;
Published property SortType;
Published property TabOrder;
Published property TabStop default true;
Published property Touch;
Published property ViewStyle;
Published property Visible;
Published property OnAdvancedCustomDraw;
Published property OnAdvancedCustomDrawItem;
Published property OnAdvancedCustomDrawSubItem;
Published property OnChange;
Published property OnChanging;
Published property OnClick;
Published property OnColumnClick;
Published property OnColumnDragged;
Published property OnColumnRightClick;
Published property OnCompare;
Published property OnContextPopup;
Published property OnCustomDraw;
Published property OnCustomDrawItem;
Published property OnCustomDrawSubItem;
Published property OnCreateItemClass;
Published property OnData;
Published property OnDataFind;
Published property OnDataHint;
Published property OnDataStateChange;
Published property OnDblClick;
Published property OnDeletion;
Published property OnDrawItem;
Published property OnEdited;
Published property OnEditing;
Published property OnEndDock;
Published property OnEndDrag;
Published property OnEnter;
Published property OnExit;
Published property OnGesture;
Published property OnGetImageIndex;
Published property OnDragDrop;
Published property OnDragOver;
Published property OnInfoTip;
Published property OnInsert;
Published property OnKeyDown;
Published property OnKeyPress;
Published property OnKeyUp;
Published property OnMouseActivate;
Published property OnMouseDown;
Published property OnMouseEnter;
Published property OnMouseLeave;
Published property OnMouseMove;
Published property OnMouseUp;
Published property OnResize;
Published property OnSelectItem;
Published property OnStartDock;
Published property OnStartDrag;
Published property ItemOptionsEx: TItemOptionsEx read FItemOptionsEx write FItemOptionsEx;
Published property OnGetItemParams: TLVGetItemParamsEvent read FOnGetItemParams write FOnGetItemParams;
Published property OnGetItemContent: TLVGetItemContentEvent read FOnGetItemContent write FOnGetItemContent;
Published property OnCustomDrawHTMLItemEnd: TLVDrawHTMLItemEvent read FOnCustomDrawHTMLItemEnd write FOnCustomDrawHTMLItemEnd;
Published property OnClickItem: TLVClickItemEvent read FOnClickItem write FOnClickItem;

Description

Methods

Public procedure InitLoadingItems(ClearItems: boolean = false);

clear all items and init internal loading

Public function GetHTMLItem(ItemIndex: integer): TrHTMLListItem;

return item as TrHTMLListItem

Public function AddHTMLItem(HTMLText, HintText: string; ImageIndex: integer = -1): TrHTMLListItem;

add new item with defined text and hint

Public function AddHTMLItemData(HTMLText, HintText: string; ItemBitmap: TBitmap; ItemID, ItemVarData: variant; ItemObject: TObject): TrHTMLListItem;

add new item with defined text, hint and data

Public procedure UpdateHTMLItem(ItemIndex: integer; HTMLText, HintText: string);

update and refresh item text and hint

Public procedure UpdateHTMLItemData(ItemIndex: integer; ItemBitmap: TBitmap; ItemID, ItemVarData: variant; ItemObject: TObject);

update and refresh item bitmap and data

Public procedure CompareEvent(Sender: TObject; Item1, Item2: TListItem; Data: integer; var Compare: integer);

default compare according HTML text

Public procedure DrawFrame(ACanvas: TCanvas; var R: TRect; FrameType: TFrameType; aColor: TColor);

draw frame of defined type and color

Public procedure DrawThemeBk(ACanvas: TCanvas; R: TRect; State: TCustomDrawState);

draw standard theme background of item according state

Public procedure LoadFileList(FilePath, FileMask: string; HtmlTextMask: string = ''; SortByFileName: boolean = false; LoadImages: boolean = false);

add Items as file list from specified directory according file mask, set item text according HtmlTextFormat (<<File>> will be replaced by filename) set ItemID to file name including path

Public function LoadFileImages(LoadAllItems: boolean = false; LoadSelected: boolean = false): boolean;

add images for loaded file list, can be called repeatedly by timer or OnIdle event, set ItemVarData to string Width;Height return false if all items are loaded

Public procedure LoadDBList(Dataset: TDataset; KeyField, ImageField: TField; HtmlTextMask: string = ''; HintTextMask: string = ''; LoadImages: boolean = false);

load records from dataset, KeyField define key value for each record, set item text according HtmlTextMask (<<FieldName>> will be replaced by field value), set hint text according HintTextMask (<<FieldName>> will be replaced by field value), set ItemID to record key value

Public function LoadDBImages(Dataset: TDataset; KeyField, ImageField: TField; LoadAllItems: boolean = false; LoadSelected: boolean = false): boolean;

add images for loaded db records, can be called repeatedly by timer or OnIdle event, set ItemVarData to string Width;Height return false if all items are loaded

Properties

Published property Action;
 
Published property Align;
 
Published property AllocBy;
 
Published property Anchors;
 
Published property BevelEdges;
 
Published property BevelInner;
 
Published property BevelOuter;
 
Published property BevelKind default bkNone;
 
Published property BevelWidth;
 
Published property BiDiMode;
 
Published property BorderStyle;
 
Published property BorderWidth;
 
Published property Color;

property Checkboxes;

Published property Columns;
 
Published property ColumnClick;
 
Published property Constraints;
 
Published property Ctl3D;
 
Published property DoubleBuffered;
 
Published property DragCursor;
 
Published property DragKind;
 
Published property DragMode;
 
Published property Enabled;
 
Published property Font;
 
Published property FlatScrollBars;
 
Published property FullDrag;
 
Published property GridLines;
 
Published property HideSelection;

property Groups;

Published property HotTrack;
 
Published property HotTrackStyles;
 
Published property HoverTime;
 
Published property IconOptions;
 
Published property Items;
 
Published property MultiSelect;

property LargeImages;

Published property OwnerData;
 
Published property OwnerDraw;
 
Published property ReadOnly default false;

property GroupHeaderImages; property GroupView default False;

Published property RowSelect;
 
Published property ParentBiDiMode;
 
Published property ParentColor default false;
 
Published property ParentDoubleBuffered;
 
Published property ParentFont;
 
Published property ParentShowHint;
 
Published property PopupMenu;
 
Published property ShowColumnHeaders;
 
Published property ShowWorkAreas;
 
Published property ShowHint;
 
Published property SortType;

property SmallImages;

Published property TabOrder;

property StateImages;

Published property TabStop default true;
 
Published property Touch;
 
Published property ViewStyle;
 
Published property Visible;
 
Published property OnAdvancedCustomDraw;
 
Published property OnAdvancedCustomDrawItem;
 
Published property OnAdvancedCustomDrawSubItem;
 
Published property OnChange;
 
Published property OnChanging;
 
Published property OnClick;
 
Published property OnColumnClick;
 
Published property OnColumnDragged;
 
Published property OnColumnRightClick;
 
Published property OnCompare;
 
Published property OnContextPopup;
 
Published property OnCustomDraw;
 
Published property OnCustomDrawItem;
 
Published property OnCustomDrawSubItem;
 
Published property OnCreateItemClass;
 
Published property OnData;
 
Published property OnDataFind;
 
Published property OnDataHint;
 
Published property OnDataStateChange;
 
Published property OnDblClick;
 
Published property OnDeletion;
 
Published property OnDrawItem;
 
Published property OnEdited;
 
Published property OnEditing;
 
Published property OnEndDock;
 
Published property OnEndDrag;
 
Published property OnEnter;
 
Published property OnExit;
 
Published property OnGesture;
 
Published property OnGetImageIndex;
 
Published property OnDragDrop;

property OnGetSubItemImage;

Published property OnDragOver;
 
Published property OnInfoTip;
 
Published property OnInsert;
 
Published property OnKeyDown;
 
Published property OnKeyPress;
 
Published property OnKeyUp;
 
Published property OnMouseActivate;
 
Published property OnMouseDown;
 
Published property OnMouseEnter;
 
Published property OnMouseLeave;
 
Published property OnMouseMove;
 
Published property OnMouseUp;
 
Published property OnResize;
 
Published property OnSelectItem;
 
Published property OnStartDock;

property OnItemChecked;

Published property OnStartDrag;
 
Published property ItemOptionsEx: TItemOptionsEx read FItemOptionsEx write FItemOptionsEx;

defines all new Items design properties (size, colors, position)

Published property OnGetItemParams: TLVGetItemParamsEvent read FOnGetItemParams write FOnGetItemParams;

event is called to modify all design properties of item

Published property OnGetItemContent: TLVGetItemContentEvent read FOnGetItemContent write FOnGetItemContent;

event is called to modify text and image of item

Published property OnCustomDrawHTMLItemEnd: TLVDrawHTMLItemEvent read FOnCustomDrawHTMLItemEnd write FOnCustomDrawHTMLItemEnd;

event is called to add any custom drawing to item

Published property OnClickItem: TLVClickItemEvent read FOnClickItem write FOnClickItem;

event is called after click to any item


Generated by PasDoc 0.15.0.