Added: categories shown in bold
This commit is contained in:
parent
9929578ef0
commit
b1035c6db2
@ -26,9 +26,6 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
Align = alBottom
|
Align = alBottom
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ExplicitLeft = 168
|
|
||||||
ExplicitTop = 232
|
|
||||||
ExplicitWidth = 185
|
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
692
|
692
|
||||||
41)
|
41)
|
||||||
@ -42,7 +39,6 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
Default = True
|
Default = True
|
||||||
ModalResult = 1
|
ModalResult = 1
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ExplicitLeft = 467
|
|
||||||
end
|
end
|
||||||
object btnCancel: TButton
|
object btnCancel: TButton
|
||||||
Left = 609
|
Left = 609
|
||||||
@ -54,7 +50,6 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
Caption = 'Cancel'
|
Caption = 'Cancel'
|
||||||
ModalResult = 2
|
ModalResult = 2
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
ExplicitLeft = 548
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object vstFunctions: TVirtualStringTree
|
object vstFunctions: TVirtualStringTree
|
||||||
@ -80,6 +75,7 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowTreeLines, toThemeAware, toUseBlendedImages]
|
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowTreeLines, toThemeAware, toUseBlendedImages]
|
||||||
TreeOptions.SelectionOptions = [toFullRowSelect]
|
TreeOptions.SelectionOptions = [toFullRowSelect]
|
||||||
OnGetText = vstFunctionsGetText
|
OnGetText = vstFunctionsGetText
|
||||||
|
OnPaintText = vstFunctionsPaintText
|
||||||
Columns = <
|
Columns = <
|
||||||
item
|
item
|
||||||
Position = 0
|
Position = 0
|
||||||
@ -100,10 +96,6 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
ExplicitLeft = 224
|
|
||||||
ExplicitTop = 192
|
|
||||||
ExplicitWidth = 185
|
|
||||||
ExplicitHeight = 41
|
|
||||||
object vstStates: TVirtualStringTree
|
object vstStates: TVirtualStringTree
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 113
|
Top = 113
|
||||||
@ -118,9 +110,6 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
Header.Font.Style = []
|
Header.Font.Style = []
|
||||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoShowSortGlyphs, hoVisible]
|
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoShowSortGlyphs, hoVisible]
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ExplicitTop = 93
|
|
||||||
ExplicitWidth = 407
|
|
||||||
ExplicitHeight = 259
|
|
||||||
Columns = <
|
Columns = <
|
||||||
item
|
item
|
||||||
Position = 0
|
Position = 0
|
||||||
@ -141,7 +130,6 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
Align = alTop
|
Align = alTop
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
ExplicitWidth = 407
|
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
411
|
411
|
||||||
113)
|
113)
|
||||||
|
@ -6,6 +6,7 @@ uses
|
|||||||
Vcl.Controls,
|
Vcl.Controls,
|
||||||
Vcl.ExtCtrls,
|
Vcl.ExtCtrls,
|
||||||
Vcl.Forms,
|
Vcl.Forms,
|
||||||
|
Vcl.Graphics,
|
||||||
Vcl.StdCtrls,
|
Vcl.StdCtrls,
|
||||||
|
|
||||||
VirtualTrees,
|
VirtualTrees,
|
||||||
@ -30,6 +31,7 @@ type
|
|||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure vstFunctionsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
|
procedure vstFunctionsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; var CellText: string);
|
||||||
|
procedure vstFunctionsPaintText(Sender: TBaseVirtualTree; const TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType);
|
||||||
private
|
private
|
||||||
FButtonIndex: Integer;
|
FButtonIndex: Integer;
|
||||||
FProfile: TProfile;
|
FProfile: TProfile;
|
||||||
@ -167,10 +169,26 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
nodeData := Sender.GetNodeData(Node);
|
nodeData := Sender.GetNodeData(Node);
|
||||||
|
|
||||||
case nodeData^.NodeType of
|
case nodeData^.NodeType of
|
||||||
ntCategory: CellText := nodeData^.LEDFunction.GetCategoryName;
|
ntCategory: CellText := nodeData^.LEDFunction.GetCategoryName;
|
||||||
ntFunction: CellText := nodeData^.LEDFunction.GetDisplayName;
|
ntFunction: CellText := nodeData^.LEDFunction.GetDisplayName;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TButtonFunctionForm.vstFunctionsPaintText(Sender: TBaseVirtualTree; const TargetCanvas: TCanvas;
|
||||||
|
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType);
|
||||||
|
var
|
||||||
|
nodeData: PNodeData;
|
||||||
|
|
||||||
|
begin
|
||||||
|
nodeData := Sender.GetNodeData(Node);
|
||||||
|
|
||||||
|
if nodeData^.NodeType = ntCategory then
|
||||||
|
TargetCanvas.Font.Style := [fsBold]
|
||||||
|
else
|
||||||
|
TargetCanvas.Font.Style := [];
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user