Class TRxCustomListBox (unit RXCtrls)

Inherits from

TWinControl

Constructors


constructor Create(AOwner: TComponent);



Functions

procedure Clear;


procedure DefaultDrawText(X, Y: Integer; const S: string);


destructor Destroy;


function ItemAtPos(Pos: TPoint; Existing: Boolean): Integer;


function ItemRect(Index: Integer): TRect;


function CreateItemList: TStrings;


procedure CreateParams(var Params: TCreateParams);


procedure CreateWnd;


procedure DeleteString(Index: Integer);


procedure DestroyWnd;


procedure DragCanceled;


procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState);


function GetItemData(Index: Integer): Longint;


function GetItemWidth(Index: Integer): Integer;


procedure MeasureItem(Index: Integer; var Height: Integer);


procedure ResetContent;


procedure SetItemData(Index: Integer; AData: LongInt);


procedure SetItems(Value: TStrings);


procedure WndProc(var Message: TMessage);


procedure CMCtl3DChanged(var Message: TMessage);


procedure CNCommand(var Message: TWMCommand);


procedure CNDrawItem(var Message: TWMDrawItem);


procedure CNMeasureItem(var Message: TWMMeasureItem);


function GetAutoScroll: Boolean;


function GetItemHeight: Integer;


function GetItemIndex: Integer;


function GetSelCount: Integer;


function GetSelected(Index: Integer): Boolean;


function GetTopIndex: Integer;


procedure ResetHorizontalExtent;

if (FTabChar > #0) then for I := 1 to Length(S) do if S[I] = FTabChar then S[I] := #9;

procedure SetAutoScroll(Value: Boolean);


procedure SetBorderStyle(Value: TBorderStyle);


procedure SetColumns(Value: Integer);


procedure SetColumnWidth;


procedure SetExtendedSelect(Value: Boolean);


procedure SetHorizontalExtent;


procedure SetIntegralHeight(Value: Boolean);


procedure SetItemHeight(Value: Integer);


procedure SetItemIndex(Value: Integer);


procedure SetMultiSelect(Value: Boolean);


procedure SetOnDrawItem(Value: TDrawItemEvent);


procedure SetOnGetItemWidth(Value: TGetItemWidthEvent);


procedure SetSelected(Index: Integer; Value: Boolean);


procedure SetSorted(Value: Boolean);


procedure SetStyle(Value: TListBoxStyle);


procedure SetTabWidth(Value: Integer);


procedure SetTopIndex(Value: Integer);


procedure WMLButtonDown(var Message: TWMLButtonDown);

overrides TControl's BeginDrag

procedure WMNCHitTest(var Msg: TWMNCHitTest);


procedure WMPaint(var Message: TWMPaint);


procedure WMSize(var Message: TWMSize);

Draw the listbox

Properties

property TabStop :


property Canvas : TCanvas


property ItemIndex : Integer


property Items : TStrings


property SelCount : Integer


property Selected : Boolean


property TopIndex : Integer


property AutoScroll : Boolean


property BorderStyle : TBorderStyle


property Columns : Integer


property ExtendedSelect : Boolean


property IntegralHeight : Boolean


property ItemHeight : Integer


property MultiSelect : Boolean


property ParentColor :


property Sorted : Boolean


property Style : TListBoxStyle


property TabWidth : Integer


Events

event OnDrawItem : TDrawItemEvent


event OnGetItemWidth : TGetItemWidthEvent


event OnMeasureItem : TMeasureItemEvent


Variables

FAutoScroll : Boolean;


FBorderStyle : TBorderStyle;


FCanvas : TCanvas;


FColumns : Integer;


FExtendedSelect : Boolean;


FIntegralHeight : Boolean;


FItemHeight : Integer;


FItems : TStrings;


FMaxItemWidth : Integer;


FMultiSelect : Boolean;


FOnDrawItem : TDrawItemEvent;


FOnGetItemWidth : TGetItemWidthEvent;


FOnMeasureItem : TMeasureItemEvent;


FSaveItemIndex : Integer;


FSaveItems : TStringList;


FSaveTopIndex : Integer;


FSorted : Boolean;


FStyle : TListBoxStyle;


FTabWidth : Integer;



Constructors


constructor Create(AOwner: TComponent);


Functions


procedure Clear;


procedure DefaultDrawText(X, Y: Integer; const S: string);


destructor Destroy;


function ItemAtPos(Pos: TPoint; Existing: Boolean): Integer;


function ItemRect(Index: Integer): TRect;


function CreateItemList: TStrings;


procedure CreateParams(var Params: TCreateParams);


procedure CreateWnd;


procedure DeleteString(Index: Integer);


procedure DestroyWnd;


procedure DragCanceled;


procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState);


function GetItemData(Index: Integer): Longint;


function GetItemWidth(Index: Integer): Integer;


procedure MeasureItem(Index: Integer; var Height: Integer);


procedure ResetContent;


procedure SetItemData(Index: Integer; AData: LongInt);


procedure SetItems(Value: TStrings);


procedure WndProc(var Message: TMessage);


procedure CMCtl3DChanged(var Message: TMessage);


procedure CNCommand(var Message: TWMCommand);


procedure CNDrawItem(var Message: TWMDrawItem);


procedure CNMeasureItem(var Message: TWMMeasureItem);


function GetAutoScroll: Boolean;


function GetItemHeight: Integer;


function GetItemIndex: Integer;


function GetSelCount: Integer;


function GetSelected(Index: Integer): Boolean;


function GetTopIndex: Integer;


procedure ResetHorizontalExtent;

if (FTabChar > #0) then for I := 1 to Length(S) do if S[I] = FTabChar then S[I] := #9;


procedure SetAutoScroll(Value: Boolean);


procedure SetBorderStyle(Value: TBorderStyle);


procedure SetColumns(Value: Integer);


procedure SetColumnWidth;


procedure SetExtendedSelect(Value: Boolean);


procedure SetHorizontalExtent;


procedure SetIntegralHeight(Value: Boolean);


procedure SetItemHeight(Value: Integer);


procedure SetItemIndex(Value: Integer);


procedure SetMultiSelect(Value: Boolean);


procedure SetOnDrawItem(Value: TDrawItemEvent);


procedure SetOnGetItemWidth(Value: TGetItemWidthEvent);


procedure SetSelected(Index: Integer; Value: Boolean);


procedure SetSorted(Value: Boolean);


procedure SetStyle(Value: TListBoxStyle);


procedure SetTabWidth(Value: Integer);


procedure SetTopIndex(Value: Integer);


procedure WMLButtonDown(var Message: TWMLButtonDown);

overrides TControl's BeginDrag


procedure WMNCHitTest(var Msg: TWMNCHitTest);


procedure WMPaint(var Message: TWMPaint);


procedure WMSize(var Message: TWMSize);

Draw the listbox


Properties


property TabStop :


property Canvas : TCanvas


property ItemIndex : Integer


property Items : TStrings


property SelCount : Integer


property Selected : Boolean


property TopIndex : Integer


property AutoScroll : Boolean


property BorderStyle : TBorderStyle


property Columns : Integer


property ExtendedSelect : Boolean


property IntegralHeight : Boolean


property ItemHeight : Integer


property MultiSelect : Boolean


property ParentColor :


property Sorted : Boolean


property Style : TListBoxStyle


property TabWidth : Integer


Events


event OnDrawItem : TDrawItemEvent


event OnGetItemWidth : TGetItemWidthEvent


event OnMeasureItem : TMeasureItemEvent


Variables


FAutoScroll : Boolean;


FBorderStyle : TBorderStyle;


FCanvas : TCanvas;


FColumns : Integer;


FExtendedSelect : Boolean;


FIntegralHeight : Boolean;


FItemHeight : Integer;


FItems : TStrings;


FMaxItemWidth : Integer;


FMultiSelect : Boolean;


FOnDrawItem : TDrawItemEvent;


FOnGetItemWidth : TGetItemWidthEvent;


FOnMeasureItem : TMeasureItemEvent;


FSaveItemIndex : Integer;


FSaveItems : TStringList;


FSaveTopIndex : Integer;


FSorted : Boolean;


FStyle : TListBoxStyle;


FTabWidth : Integer;