|
@@ -111,12 +111,12 @@ type
|
|
function GetCaption(Index: Integer): String;
|
|
function GetCaption(Index: Integer): String;
|
|
function GetChecked(Index: Integer): Boolean;
|
|
function GetChecked(Index: Integer): Boolean;
|
|
function GetItemEnabled(Index: Integer): Boolean;
|
|
function GetItemEnabled(Index: Integer): Boolean;
|
|
|
|
+ function GetItemFontStyle(Index: Integer): TFontStyles;
|
|
function GetLevel(Index: Integer): Byte;
|
|
function GetLevel(Index: Integer): Byte;
|
|
function GetObject(Index: Integer): TObject;
|
|
function GetObject(Index: Integer): TObject;
|
|
function GetState(Index: Integer): TCheckBoxState;
|
|
function GetState(Index: Integer): TCheckBoxState;
|
|
- function GetItemFont(Index: Integer): TFontStyles;
|
|
|
|
- function GetSubItemFont(Index: Integer): TFontStyles;
|
|
|
|
function GetSubItem(Index: Integer): string;
|
|
function GetSubItem(Index: Integer): string;
|
|
|
|
+ function GetSubItemFontStyle(Index: Integer): TFontStyles;
|
|
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
|
|
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
|
|
procedure KeyUp(var Key: Word; Shift: TShiftState); override;
|
|
procedure KeyUp(var Key: Word; Shift: TShiftState); override;
|
|
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
|
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
|
@@ -128,12 +128,12 @@ type
|
|
procedure SetChecked(Index: Integer; const AChecked: Boolean);
|
|
procedure SetChecked(Index: Integer; const AChecked: Boolean);
|
|
procedure SetFlat(Value: Boolean);
|
|
procedure SetFlat(Value: Boolean);
|
|
procedure SetItemEnabled(Index: Integer; const AEnabled: Boolean);
|
|
procedure SetItemEnabled(Index: Integer; const AEnabled: Boolean);
|
|
|
|
+ procedure SetItemFontStyle(Index: Integer; const AItemFontStyle: TFontStyles);
|
|
procedure SetObject(Index: Integer; const AObject: TObject);
|
|
procedure SetObject(Index: Integer; const AObject: TObject);
|
|
- procedure SetItemFont(Index: Integer; const AItemFontStyle: TFontStyles);
|
|
|
|
- procedure SetSubItemFont(Index: Integer; const ASubItemFontStyle: TFontStyles);
|
|
|
|
procedure SetOffset(AnOffset: Integer);
|
|
procedure SetOffset(AnOffset: Integer);
|
|
procedure SetShowLines(Value: Boolean);
|
|
procedure SetShowLines(Value: Boolean);
|
|
procedure SetSubItem(Index: Integer; const ASubItem: String);
|
|
procedure SetSubItem(Index: Integer; const ASubItem: String);
|
|
|
|
+ procedure SetSubItemFontStyle(Index: Integer; const ASubItemFontStyle: TFontStyles);
|
|
property ItemStates[Index: Integer]: TItemState read GetItemState;
|
|
property ItemStates[Index: Integer]: TItemState read GetItemState;
|
|
public
|
|
public
|
|
constructor Create(AOwner: TComponent); override;
|
|
constructor Create(AOwner: TComponent); override;
|
|
@@ -153,12 +153,12 @@ type
|
|
property Checked[Index: Integer]: Boolean read GetChecked write SetChecked;
|
|
property Checked[Index: Integer]: Boolean read GetChecked write SetChecked;
|
|
property ItemCaption[Index: Integer]: String read GetCaption write SetCaption;
|
|
property ItemCaption[Index: Integer]: String read GetCaption write SetCaption;
|
|
property ItemEnabled[Index: Integer]: Boolean read GetItemEnabled write SetItemEnabled;
|
|
property ItemEnabled[Index: Integer]: Boolean read GetItemEnabled write SetItemEnabled;
|
|
|
|
+ property ItemFontStyle[Index: Integer]: TFontStyles read GetItemFontStyle write SetItemFontStyle;
|
|
property ItemLevel[Index: Integer]: Byte read GetLevel;
|
|
property ItemLevel[Index: Integer]: Byte read GetLevel;
|
|
property ItemObject[Index: Integer]: TObject read GetObject write SetObject;
|
|
property ItemObject[Index: Integer]: TObject read GetObject write SetObject;
|
|
property ItemSubItem[Index: Integer]: string read GetSubItem write SetSubItem;
|
|
property ItemSubItem[Index: Integer]: string read GetSubItem write SetSubItem;
|
|
property State[Index: Integer]: TCheckBoxState read GetState;
|
|
property State[Index: Integer]: TCheckBoxState read GetState;
|
|
- property ItemFontStyle[Index: Integer]: TFontStyles read GetItemFont write SetItemFont;
|
|
|
|
- property SubItemFontStyle[Index: Integer]: TFontStyles read GetSubItemFont write SetSubItemFont;
|
|
|
|
|
|
+ property SubItemFontStyle[Index: Integer]: TFontStyles read GetSubItemFontStyle write SetSubItemFontStyle;
|
|
published
|
|
published
|
|
property Align;
|
|
property Align;
|
|
property Anchors;
|
|
property Anchors;
|
|
@@ -1094,6 +1094,11 @@ begin
|
|
Result := ItemStates[Index].Enabled;
|
|
Result := ItemStates[Index].Enabled;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+function TNewCheckListBox.GetItemFontStyle(Index: Integer): TFontStyles;
|
|
|
|
+begin
|
|
|
|
+ Result := ItemStates[Index].ItemFontStyle;
|
|
|
|
+end;
|
|
|
|
+
|
|
function TNewCheckListBox.GetItemState(Index: Integer): TItemState;
|
|
function TNewCheckListBox.GetItemState(Index: Integer): TItemState;
|
|
begin
|
|
begin
|
|
Result := FStateList[Index];
|
|
Result := FStateList[Index];
|
|
@@ -1130,21 +1135,16 @@ begin
|
|
Result := ItemStates[Index].State;
|
|
Result := ItemStates[Index].State;
|
|
end;
|
|
end;
|
|
|
|
|
|
-function TNewCheckListBox.GetItemFont(Index: Integer): TFontStyles;
|
|
|
|
|
|
+function TNewCheckListBox.GetSubItem(Index: Integer): String;
|
|
begin
|
|
begin
|
|
- Result := ItemStates[Index].ItemFontStyle;
|
|
|
|
|
|
+ Result := ItemStates[Index].SubItem;
|
|
end;
|
|
end;
|
|
|
|
|
|
-function TNewCheckListBox.GetSubItemFont(Index: Integer): TFontStyles;
|
|
|
|
|
|
+function TNewCheckListBox.GetSubItemFontStyle(Index: Integer): TFontStyles;
|
|
begin
|
|
begin
|
|
Result := ItemStates[Index].SubItemFontStyle;
|
|
Result := ItemStates[Index].SubItemFontStyle;
|
|
end;
|
|
end;
|
|
|
|
|
|
-function TNewCheckListBox.GetSubItem(Index: Integer): String;
|
|
|
|
-begin
|
|
|
|
- Result := ItemStates[Index].SubItem;
|
|
|
|
-end;
|
|
|
|
-
|
|
|
|
procedure TNewCheckListBox.InvalidateCheck(Index: Integer);
|
|
procedure TNewCheckListBox.InvalidateCheck(Index: Integer);
|
|
var
|
|
var
|
|
IRect: TRect;
|
|
IRect: TRect;
|
|
@@ -1520,19 +1520,14 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TNewCheckListBox.SetObject(Index: Integer; const AObject: TObject);
|
|
|
|
-begin
|
|
|
|
- ItemStates[Index].Obj := AObject;
|
|
|
|
-end;
|
|
|
|
-
|
|
|
|
-procedure TNewCheckListBox.SetItemFont(Index: Integer; const AItemFontStyle: TFontStyles);
|
|
|
|
|
|
+procedure TNewCheckListBox.SetItemFontStyle(Index: Integer; const AItemFontStyle: TFontStyles);
|
|
begin
|
|
begin
|
|
ItemStates[Index].ItemFontStyle := AItemFontStyle;
|
|
ItemStates[Index].ItemFontStyle := AItemFontStyle;
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TNewCheckListBox.SetSubItemFont(Index: Integer; const ASubItemFontStyle: TFontStyles);
|
|
|
|
|
|
+procedure TNewCheckListBox.SetObject(Index: Integer; const AObject: TObject);
|
|
begin
|
|
begin
|
|
- ItemStates[Index].SubItemFontStyle := ASubItemFontStyle;
|
|
|
|
|
|
+ ItemStates[Index].Obj := AObject;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TNewCheckListBox.SetOffset(AnOffset: Integer);
|
|
procedure TNewCheckListBox.SetOffset(AnOffset: Integer);
|
|
@@ -1579,6 +1574,11 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TNewCheckListBox.SetSubItemFontStyle(Index: Integer; const ASubItemFontStyle: TFontStyles);
|
|
|
|
+begin
|
|
|
|
+ ItemStates[Index].SubItemFontStyle := ASubItemFontStyle;
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TNewCheckListBox.Toggle(Index: Integer);
|
|
procedure TNewCheckListBox.Toggle(Index: Integer);
|
|
begin
|
|
begin
|
|
case ItemStates[Index].ItemType of
|
|
case ItemStates[Index].ItemType of
|