仪器控制

概览

探索 Altium Designer 脚本环境中可用的仪器控件,查阅组件方法及其 Delphi VCL 继承关系。本文介绍如何查看属性和事件、使用代码补全查找方法,以及浏览按钮、仪表和显示器等控件。同时,本文也指出,自 Altium Designer 18.0 起,已不再支持通过自定义仪器监测和控制信号的 FPGA 设计功能。继续阅读,查找脚本编写所需的参考信息。

- 在“对象检查器”面板中查找控件的属性和事件,并使用 Ctrl+Space 查找方法。
- 了解控件从 VCL 类继承了哪些方法,以及它们提供了哪些附加方法。
- 浏览各组件的方法参考,同时留意 FPGA 支持方面的限制。
使用 AI 深入了解:

Tool Palette's Instrument Controls 选项卡包含用于设计 Altium Designer 自定义仪器面板 GUI 的元件(控件)。这些控件专供自定义仪器使用。

虽然仪器控件可在 Altium Designer 的脚本环境中使用,但请注意,从 18.0 版本开始,Altium Designer 不再支持 FPGA 设计,因此也不再支持在这类设计中使用自定义仪器监测和控制信号。
虽然仪器控件可在 Altium NEXUS 的脚本环境中使用,但请注意,Altium NEXUS 不支持 FPGA 设计,因此也不支持在这类设计中使用自定义仪器监测和控制信号。

► 有关各个仪器控件的功能说明,请参阅自定义仪器 GUI - 可用的仪器控件。

要查看放置在脚本窗体上的仪器控件元件的相关属性和事件,请使用对象检查器面板(View » Panels » Object Inspector)中的 Properties 或 Events 选项卡。

要查找仪器控件的特定方法(或属性),请使用代码补全功能(请参阅脚本编辑器工具)。例如,输入 TInstrumentCheckBox.get 后,代码补全窗口将显示经过适当筛选的 TInstrumentCheckBox 元件的方法和属性列表。使用 Ctrl+Space 可手动调出代码补全窗口。

使用代码补全(Ctrl+Space)功能可查看元件可用的方法或属性。
使用代码补全(Ctrl+Space)功能可查看元件可用的方法或属性。

继承

大多数仪器控件类的方法(以及属性和事件)继承自 Delphi VCL 的 TGraphicControl 或 TCustomControl 基类。因此,此处介绍的仪器控件方法是在这些基类之一的基础上新增的方法,各条目参考说明中均有注明。

例如,TInstrumentCheckBox 控件自上而下的继承关系如下:

继承路径 方法
TGraphicControl 请参阅对应的 Delphi 参考文档。
    TCustomInstrumentCheckBox 请参阅下方的 TXPCheckBox 条目。
        TInstrumentCheckBox 请参阅下方的 TXPCheckBox 条目。

元件方法

Altium 仪器控件元件基于 Embarcadero 可视化组件库 (VCL) 中的核心类。每个仪器控件都继承其 VCL 源类的方法、属性和事件,而且大多数还提供额外的自定义方法。例如,TInstrumentCheckBox 元件和标准 TCheckBox 元件都提供 Click 方法,而 TInstrumentCheckBox 元件还提供 Changed 方法。

使用以下列表可跳转至“仪器控件”类别中各元件的可用方法信息:

TSignalLinkManager 仪器信号链接管理器。
TInstrumentBackgroundPanel 仪器面板背景颜色。
TInstrumentBackground 仪器背景颜色。
TInstrumentButton 仪器按钮。
TInstrumentCaption 仪器面板标题。
TInstrumentCheckBox 仪器复选框。
TInstrumentEdit 仪器编辑框。
TInstrumentGauge 模拟式仪器表盘/仪表。
TInstrumentGlyphButton 仪器快捷按钮图像。
TInstrumentGraph 仪器图形显示。
TInstrumentKnob 仪器旋转控制旋钮。
TInstrumentLabel 仪器面板标签。
TInstrumentLEDDigits 七段式 LED 数字显示。
TInstrumentLEDsPanel 成组的 LED 指示灯行。
TInstrumentMultiGraph 多条曲线图形显示。
TInstrumentNumericPanel 仪器数值显示。
TInstrumentPanel 仪器面板区域。
TInstrumentProgressBar LED 条形信号/进度指示器
TInstrumentRadioButton 仪器单选按钮选择器。
TInstrumentRadioGroup 仪器单选按钮组控件。
TInstrumentScrollbar 仪器滚动条控件。
TInstrumentShape 仪器面板几何形状。
TInstrumentSilkScreen 仪器面板丝印覆盖层。
TInstrumentTerminal 仪器字符显示终端窗口。
TInstrumentTrackBar 仪器滑动条控件。

TSignalLinkManager

TSignalLinkManager 的方法继承自 TComponent 基类。TSignalLinkManager 类提供以下额外方法:

TSignalLinkManager:
Procedure DoPoll;
Procedure ClearSignalLinks;
Procedure UpdateSignals(AInput, AOutput : LongBool);

TInstrumentBackgroundPanel

TInstrumentBackgroundPanel 的方法继承自 TCustomControl 基类。TXPCustomControl、TXPCustomExtPanel 和 TCustomInstrumentBackgroundPanel 类提供以下额外方法:

TXPCustomControl:
Procedure UpdateSmoothDraw;
Function  GetModified : Boolean;
Procedure ClearModified;

TXPCustomExtPanel:
Function  GetDrawingMode : TXPDrawingMode;
Function  UseRegion      : Boolean;
Function  DoCreateRegion : HRGN;
Procedure BeginUpdate;
Procedure EndUpdate;

TCustomInstrumentBackgroundPanel:
Procedure UpdateBackgroundImage;
Procedure UpdateChildControls;

TInstrumentBackground

TInstrumentBackground 的方法继承自 TGraphicControl 基类。TCustomGraphicInstrumentWithBackground 和 TCustomGraphicInstrumentWithInterior 类提供以下额外方法:

TCustomGraphicInstrumentWithBackground:
Procedure BackgroundOptionsChanged(AChanges : TInstrumentBackgroundOptions);
Procedure MarginChanged;

TCustomGraphicInstrumentWithInterior:
Procedure BackgroundOptionsChanged(AChanges : TInstrumentBackgroundOptions);
Procedure MarginChanged;
Procedure DoPaint(ACanvas : TCanvas; X : Integer = 0; Y : Integer = 0);
Procedure PaintInterior(ACanvas : TCanvas; ARect : TRect);
Function  UseCreamBackground : Boolean;

TInstrumentButton

TInstrumentButton 的方法继承自 TCustomControl 基类。TXPCustomControl、TXPCustomTransparentControl、TXPBaseCustomSpeedButton, TXPCustomSpeedButton 和 TCustomInstrumentButton 类提供以下额外方法:

TXPCustomControl:
Procedure UpdateSmoothDraw;
Function  GetModified : Boolean;
Procedure ClearModified;

TXPCustomTransparentControl:
Procedure TransparentChanged;

TXPBaseCustomSpeedButton:
Function  GetShiftContentIfPressed : Boolean;
Procedure VCLClick;
Procedure PaintStandard    (ARect,ARectDrop : TRect; APushed : Boolean);
Procedure PaintFading      (Const ARectDrop : TRect; APushed : Boolean);
Procedure DrawImage        (Canvas : TCanvas; Const ARect : TRect; AEnabled : Boolean);
Procedure DrawFadingImage  (Canvas : TCanvas; Const ARect : TRect);
Procedure CopyToImage      (AlphaImage : TAlphaBitmap);
Procedure RedrawImage      (Const ARect : TRect);
Procedure RedrawCaption    (Const ARect : TRect; Const ACaption : String; AFontColor : TColor);
Procedure RedrawInside     (ARect : TRect; AFontColor : TColor; DoFontFading : Boolean);
Procedure CalculatePositions(Const ARect : TRect; Out TotalSize : TPoint; Out GlyphPos : TPoint; Out TextBounds : TRect);
Function  NeedPaintDropdown    : Boolean;
Function  PushOnClick          : Boolean;
Function  GetDrawCaptionFlags  : TXPDrawCaptionFlags;
Function  GetEllipsisPosition  : TEllipsisPosition;
Function  GetFadingEnabled     : Boolean;
Function  GetGlyphSize(Out GlyphSize : TSize) : Boolean;
Procedure UpdateExclusive;
Procedure AppearanceChanged(AChange : TAppearanceChange);
Procedure KindChanged;

TXPCustomSpeedButton:
Procedure GlyphChanged   (Sender : TObject);
Procedure GetGlyphInfo   (Out GlyphToDraw : TGraphic; Out NumGlyphsToDraw : Integer);
Function  GetImageState : Integer;

TCustomInstrumentButton:
Function  GetCaptionFontColor(ADown, AOn : Boolean) : TColor;
Function  GetDrawFlags       (ADown, AOn : Boolean) : TDrawInstrumentButtonFlags;
Function  GetDrawCaptionStyle(ADown, AOn : Boolean) : TDrawInstrumentButtonCaptionStyle;
Function  GetGlowIntensity : TGlowIntensity;
Procedure BackgroundChanged(Sender : TObject);
Procedure UpdateBitmaps;

TInstrumentCaption

TInstrumentCaption 的方法继承自 TCustomLabel 基类。TCustomInstrumentLabel 类提供以下额外方法:

TCustomInstrumentLabel:
Procedure DoPaint(ACanvas : TCanvas; Const ARect : TRect);

TInstrumentCheckBox

TInstrumentCheckBox 的方法继承自 TGraphicControl 基类。TCustomInstrumentCheckBox 类提供以下额外方法:

TCustomInstrumentCheckBox:
Procedure Changed;

TInstrumentEdit

TInstrumentEdit 的方法继承自 TCustomControl 基类。TXPCustomControl 和 TCustomXPEdit 类提供以下额外方法:

TXPCustomControl:
Procedure UpdateSmoothDraw;
Function GetModified : Boolean;
Procedure ClearModified;

TCustomXPEdit:
Function  CalcInternalHeight : Integer;
Procedure Change;
Procedure ChangeHotFont(IsHot : Boolean);
Procedure Clear;
Procedure ClearSelection;
Procedure ClearUndo;
Procedure CopyToClipboard;
Procedure CreateCaret;
Procedure CutToClipboard;
Procedure DestroyCaret;
Procedure DoEndCapture;
Procedure DrawInside(ARect : TRect; AColor, AFrameColor, AHLTextColor, AHLColor, AFontColor : TColor);
Function  GetAutoWidth : Integer;
Function  GetCursorPos : TPoint;
Function  GetEditDetails : TThemedElementDetails;
Function  GetEditorBounds : TRect;
Function  GetEditState : TThemedEdit;
Function  GetExcludeRect : TRect;
Procedure InsertString(Str : TXPString);
Procedure InternalSetCursor;
Procedure NumberFormatChanged;
Procedure SelectAll;
Procedure SetCaretPos(Value : Integer);
Procedure SetText       (Const Value : TCaption);
Procedure SetTransparent(Const Value : Boolean);
Procedure Undo;

TInstrumentGauge

TInstrumentGauge 的方法继承自 TGraphicControl 基类。TCustomGraphicInstrumentWithBackground、TCustomGraphicInstrumentWithNoise 和 TCustomInstrumentGauge 类提供以下额外方法:

TCustomGraphicInstrumentWithBackground:
Procedure BackgroundOptionsChanged(AChanges : TInstrumentBackgroundOptions);
Procedure MarginChanged;

TCustomGraphicInstrumentWithNoise:
Procedure PaintOnPanel(APanel : TCustomInstrumentBackgroundPanel);
Procedure PaintControlBackground(ABitmap : TBitmap; X, Y : Integer);
Procedure PaintControlForeground(ABitmap : TBitmap; X, Y : Integer);

TCustomInstrumentGauge:
Procedure SetMax(Const Value : TProgressValue);
Procedure SetMin(Const Value : TProgressValue);
Procedure DoGetScaleLabel(AValue : TGaugeValue; Var ALabelString : String);

TInstrumentGlyphButton

TInstrumentGlyphButton 的方法继承自 TCustomControl 基类。TXPCustomControl、TXPCustomTransparentControl、TXPBaseCustomSpeedButton, TXPCustomSpeedButton、 TCustomInstrumentButton 和 TCustomInstrumentGlyphButton 类提供以下额外方法:

TXPCustomControl:
Procedure UpdateSmoothDraw;
Function  GetModified : Boolean;
Procedure ClearModified;

TXPCustomTransparentControl:
Procedure TransparentChanged;

TXPBaseCustomSpeedButton:
Function  GetShiftContentIfPressed : Boolean;
Procedure VCLClick;
Procedure PaintStandard    (ARect,ARectDrop : TRect; APushed : Boolean);
Procedure PaintFading      (Const ARectDrop : TRect; APushed : Boolean);
Procedure DrawImage        (Canvas : TCanvas; Const ARect : TRect; AEnabled : Boolean);
Procedure DrawFadingImage  (Canvas : TCanvas; Const ARect : TRect);
Procedure CopyToImage      (AlphaImage : TAlphaBitmap);
Procedure RedrawImage      (Const ARect : TRect);
Procedure RedrawCaption    (Const ARect : TRect; Const ACaption : String; AFontColor : TColor);
Procedure RedrawInside     (ARect : TRect; AFontColor : TColor; DoFontFading : Boolean);
Procedure CalculatePositions(Const ARect : TRect; Out TotalSize : TPoint; Out GlyphPos : TPoint; Out TextBounds : TRect);
Function  NeedPaintDropdown    : Boolean;
Function  PushOnClick          : Boolean;
Function  GetDrawCaptionFlags  : TXPDrawCaptionFlags;
Function  GetEllipsisPosition  : TEllipsisPosition;
Function  GetFadingEnabled     : Boolean;
Function  GetGlyphSize(Out GlyphSize : TSize) : Boolean;
Procedure UpdateExclusive;
Procedure AppearanceChanged(AChange : TAppearanceChange);
Procedure KindChanged;

TXPCustomSpeedButton:
Procedure GlyphChanged   (Sender : TObject);
Procedure GetGlyphInfo   (Out GlyphToDraw : TGraphic; Out NumGlyphsToDraw : Integer);
Function  GetImageState : Integer;

TCustomInstrumentButton:
Function  GetCaptionFontColor(ADown, AOn : Boolean) : TColor;
Function  GetDrawFlags       (ADown, AOn : Boolean) : TDrawInstrumentButtonFlags;
Function  GetDrawCaptionStyle(ADown, AOn : Boolean) : TDrawInstrumentButtonCaptionStyle;
Function  GetGlowIntensity : TGlowIntensity;
Procedure BackgroundChanged(Sender : TObject);
Procedure UpdateBitmaps;

TCustomInstrumentGlyphButton:
Procedure LEDChanged;

TInstrumentGraph

TCustomInstrumentGraph 的方法继承自 TGraphicControl 基类。TCustomGraphicInstrumentWithBackground、TCustomGraphicInstrumentWithInterior 和 TCustomInstrumentGraph 类提供以下额外方法:

TCustomGraphicInstrumentWithBackground:
Procedure BackgroundOptionsChanged(AChanges : TInstrumentBackgroundOptions);
Procedure MarginChanged;

TCustomGraphicInstrumentWithInterior:
Procedure BackgroundOptionsChanged(AChanges : TInstrumentBackgroundOptions);
Procedure MarginChanged;
Procedure DoPaint(ACanvas : TCanvas; X : Integer = 0; Y : Integer = 0);
Procedure PaintInterior(ACanvas : TCanvas; ARect : TRect);
Function  UseCreamBackground : Boolean;

TCustomInstrumentGraph:
Procedure SetMax(Const Value : TProgressValue);
Procedure SetMin(Const Value : TProgressValue);
Procedure DoGetValue(Var AValue : TGraphValue; AIndex : Integer);
Procedure BeginSetValues;
Procedure EndSetValues;

TInstrumentKnob

TInstrumentKno的方法继承自 TCustomControl 基类。TXPCustomControl 和 TCustomInstrumentSlider 类提供以下额外方法:

TXPCustomControl:
Procedure UpdateSmoothDraw;
Function  GetModified : Boolean;
Procedure ClearModified;

TCustomInstrumentSlider:
Procedure SetHandleSize(AValue : TInstrumentSize);
Procedure SetMinValue(AValue : Double);
Procedure SetMaxValue(AValue : Double);
Procedure DrawSlot   (ACanvas : TCanvas; xOffset, yOffset : Integer);
Procedure DrawTick   (ACanvas : TCanvas; xOffset, yOffset : Integer; ATicks : TInstrumentTicksFloat; ATickValue : Double; AGraphics : Pointer; APen : Pointer;
Procedure DrawNumber (ACanvas : TCanvas; xOffset, yOffset : Integer; ANumberValue : Double; Const ANumberStr : String);
Procedure DrawHandle (ACanvas : TCanvas; xOffset, yOffset : Integer);
Function  GetPositionFromMouse(X, Y : Integer) : Double;
Function  GetToolTipReferenceRect : TRect;
Procedure DoGetHintText  (AValue : Double; Var AHintText : String);
Procedure DoGetScaleLabel(AValue : Double; Side : TInstrumentSide; Var ALabelString : String);

TInstrumentLabel

TInstrumentLabel 的方法继承自 TCustomLabel 基类。TCustomInstrumentLabel 类提供以下额外方法:

TInstrumentLabel:
Procedure DoPaint(ACanvas : TCanvas; Const ARect : TRect);

TInstrumentLEDDigits

TInstrumentLEDDigit的方法继承自 TGraphicControl 基类。 TCustomGraphicInstrumentWithBackground、TCustomGraphicInstrumentWithInterior、
TCustomInstrumentDigitsPanel 和 TCustomInstrumentLEDDigits 类提供以下额外方法:

TCustomGraphicInstrumentWithBackground:
Procedure BackgroundOptionsChanged(AChanges : TInstrumentBackgroundOptions);
Procedure MarginChanged;

TCustomGraphicInstrumentWithInterior:
Procedure BackgroundOptionsChanged(AChanges : TInstrumentBackgroundOptions);
Procedure MarginChanged;
Procedure DoPaint(ACanvas : TCanvas; X : Integer = 0; Y : Integer = 0);
Procedure PaintInterior(ACanvas : TCanvas; ARect : TRect);
Function  UseCreamBackground : Boolean;

TCustomInstrumentDigitsPanel:
Procedure SetDigits       (Const AValue : NaturalNumber);
Procedure SetDigitsInGroup(Const AValue : NaturalNumber);
Procedure SetNumberType   (Const AValue : TNumberType);
Procedure SetPrecision    (Const AValue : TPrecision);
Procedure SetRadix        (Const AValue : TRadix);
Procedure DigitClick      (ADigitIndex : Integer; AButton : TMouseButton);
Function  GetDigitWidth  : Integer;
Function  GetDigitHeight : Integer;
Procedure PaintDigits     (ACanvas : TCanvas; ARect : TRect);
Procedure PaintDigit      (ACanvas : TCanvas; ARect : TRect; AValue : Byte);
Procedure ValueChanged;

TCustomInstrumentLEDDigits:
Procedure SetMax(Const Value : TProgressValue);
Procedure SetMin(Const Value : TProgressValue);

TInstrumentLEDsPanel

TInstrumentLEDsPanel 的方法继承自 TGraphicControl 基类。 TCustomGraphicInstrumentWithBackground、TCustomGraphicInstrumentWithInterior、
TCustomInstrumentDigitsPanel 和 TCustomInstrumentLEDsPanel 类提供以下额外方法:

TCustomGraphicInstrumentWithBackground:
Procedure BackgroundOptionsChanged(AChanges : TInstrumentBackgroundOptions);
Procedure MarginChanged;

TCustomGraphicInstrumentWithInterior:
Procedure BackgroundOptionsChanged(AChanges : TInstrumentBackgroundOptions);
Procedure MarginChanged;
Procedure DoPaint(ACanvas : TCanvas; X : Integer = 0; Y : Integer = 0);
Procedure PaintInterior(ACanvas : TCanvas; ARect : TRect);
Function  UseCreamBackground : Boolean;

TCustomInstrumentDigitsPanel:
Procedure SetDigits       (Const AValue : NaturalNumber);
Procedure SetDigitsInGroup(Const AValue : NaturalNumber);
Procedure SetNumberType   (Const AValue : TNumberType);
Procedure SetPrecision    (Const AValue : TPrecision);
Procedure SetRadix        (Const AValue : TRadix);
Procedure DigitClick      (ADigitIndex : Integer; AButton : TMouseButton);
Function  GetDigitWidth  : Integer;
Function  GetDigitHeight : Integer;
Procedure PaintDigits     (ACanvas : TCanvas; ARect : TRect);
Procedure PaintDigit      (ACanvas : TCanvas; ARect : TRect; AValue : Byte);
Procedure ValueChanged;

TCustomInstrumentLEDsPanel:
Procedure SetMaxValue(Const AValue : LongWord);
Procedure SetMinValue(Const AValue : LongWord);

TInstrumentMultiGraph

TInstrumentMultiGraph 的方法继承自 TGraphicControl 基类。TCustomGraphicInstrumentWithBackground、TCustomGraphicInstrumentWithInterior 和 TCustomInstrumentGraph 类提供以下额外方法:

TCustomGraphicInstrumentWithBackground:
Procedure BackgroundOptionsChanged(AChanges : TInstrumentBackgroundOptions);
Procedure MarginChanged;

TCustomGraphicInstrumentWithInterior:
Procedure BackgroundOptionsChanged(AChanges : TInstrumentBackgroundOptions);
Procedure MarginChanged;
Procedure DoPaint(ACanvas : TCanvas; X : Integer = 0; Y : Integer = 0);
Procedure PaintInterior(ACanvas : TCanvas; ARect : TRect);
Function  UseCreamBackground : Boolean;

TCustomInstrumentGraph:
Procedure SetMax(Const Value : TProgressValue);
Procedure SetMin(Const Value : TProgressValue);
Procedure DoGetValue(Var AValue : TGraphValue; AIndex : Integer);
Procedure BeginSetValues;
Procedure EndSetValues;

TInstrumentNumericPanel

TInstrumentNumericPanel 的方法继承自 TGraphicControl 基类。 TCustomGraphicInstrumentWithBackground、TCustomGraphicInstrumentWithInterior、
TCustomInstrumentDigitsPanel 和 TCustomInstrumentNumericPanel 类提供以下额外方法:

TCustomGraphicInstrumentWithBackground:
Procedure BackgroundOptionsChanged(AChanges : TInstrumentBackgroundOptions);
Procedure MarginChanged;

TCustomGraphicInstrumentWithInterior:
Procedure BackgroundOptionsChanged(AChanges : TInstrumentBackgroundOptions);
Procedure MarginChanged;
Procedure DoPaint(ACanvas : TCanvas; X : Integer = 0; Y : Integer = 0);
Procedure PaintInterior(ACanvas : TCanvas; ARect : TRect);
Function  UseCreamBackground : Boolean;

TCustomInstrumentDigitsPanel:
Procedure SetDigits       (Const AValue : NaturalNumber);
Procedure SetDigitsInGroup(Const AValue : NaturalNumber);
Procedure SetNumberType   (Const AValue : TNumberType);
Procedure SetPrecision    (Const AValue : TPrecision);
Procedure SetRadix        (Const AValue : TRadix);
Procedure DigitClick      (ADigitIndex : Integer; AButton : TMouseButton);
Function  GetDigitWidth  : Integer;
Function  GetDigitHeight : Integer;
Procedure PaintDigits     (ACanvas : TCanvas; ARect : TRect);
Procedure PaintDigit      (ACanvas : TCanvas; ARect : TRect; AValue : Byte);
Procedure ValueChanged;

TCustomInstrumentNumericPanel:
Procedure SetMaxValue(Const AValue : TNumericValue);
Procedure SetMinValue(Const AValue : TNumericValue);

TInstrumentPanel

TInstrumentPanel 的方法继承自 TCustomControl 基类。TXPCustomControl 和 TCustomInstrumentPanel 类提供以下额外方法:

TXPCustomControl:
Procedure UpdateSmoothDraw;
Function  GetModified : Boolean;
Procedure ClearModified;

TCustomInstrumentPanel:
Procedure PaintOnPanel(APanel : TCustomInstrumentBackgroundPanel);

TInstrumentProgressBar

TInstrumentProgressBar 的方法继承自 TGraphicControl 基类。TCustomGraphicInstrumentWithBackground、TCustomGraphicInstrumentWithNoise 和 TCustomInstrumentProgressBar 类提供以下额外方法:

TCustomGraphicInstrumentWithBackground:
Procedure BackgroundOptionsChanged(AChanges : TInstrumentBackgroundOptions);
Procedure MarginChanged;

TCustomGraphicInstrumentWithNoise:
Procedure PaintOnPanel(APanel : TCustomInstrumentBackgroundPanel);
Procedure PaintControlBackground(ABitmap : TBitmap; X, Y : Integer);
Procedure PaintControlForeground(ABitmap : TBitmap; X, Y : Integer);

TCustomInstrumentProgressBar:
Procedure SetMax(Const Value : TProgressValue);
Procedure SetMin(Const Value : TProgressValue);

TInstrumentRadioButton

TInstrumentRadioButton 从基类 TGraphicControl 继承其方法。TCustomInstrumentCheckBox 和 TCustomInstrumentRadioButton 类提供以下附加方法:

TCustomInstrumentCheckBox:
Procedure Changed;

TCustomInstrumentRadioButton:
Procedure TurnSiblingsOff;

TInstrumentRadioGroup

TInstrumentRadioGroup 从基类 TCustomControl 继承其方法。TXPCustomControl 和 TCustomInstrumentPanel 类提供以下附加方法:

TXPCustomControl:
Procedure UpdateSmoothDraw;
Function  GetModified : Boolean;
Procedure ClearModified;

TCustomInstrumentPanel:
Procedure PaintOnPanel(APanel : TCustomInstrumentBackgroundPanel);

TInstrumentScrollbar

TInstrumentScrollbar 从基类 TCustomControl 继承其方法。TXPCustomControl、TCustomXPScrollBar 和 TCustomInstrumentScrollBar 类提供以下附加方法:

TXPCustomControl:
Procedure UpdateSmoothDraw;
Function  GetModified : Boolean;
Procedure ClearModified;

TCustomXPScrollBar:
Procedure Change;
Procedure Scroll(ScrollCode : TScrollCode; Var ScrollPos : Integer);
Function  IgnoreThemePainting : Boolean;
Procedure DrawShaft   (Const ARect : TRect; AState : Integer);
Procedure DrawArrowBtn(Const ARect : TRect; AState : Integer; AOffset : Integer; AIsUp : Boolean);
Procedure DrawThumb   (Const ARect : TRect; AState : Integer);
Procedure SetParams   (APosition, AMin, AMax : Integer);

TCustomInstrumentScrollBar:
Procedure SetBounds(ALeft, ATop, AWidth, AHeight : Integer);

TInstrumentShape

TInstrumentShape 从基组件类 TShape 继承其方法。

TInstrumentSilkScreen

TInstrumentSilkScree从基类 TCustomControl 继承其方法。TXPCustomControl 类提供以下附加方法:

TXPCustomControl:
Procedure UpdateSmoothDraw;
Function  GetModified : Boolean;
Procedure ClearModified;

TInstrumentTerminal

TInstrumentTerminal 从基类 TCustomControl 继承其方法。 TXPCustomControl、 TCustomInstrumentPanel 和 TCustomInstrumentTerminal 类提供以下附加方法:

TXPCustomControl:
Procedure UpdateSmoothDraw;
Function  GetModified : Boolean;
Procedure ClearModified;

TCustomInstrumentPanel:
Procedure PaintOnPanel(APanel : TCustomInstrumentBackgroundPanel);

TCustomInstrumentTerminal:
Procedure DoTransmitChar(AChar : Char);
Procedure PutChar(AChar : Char ; ATransmit : Boolean);
Procedure PutString(Const AString : String; ATransmit : Boolean);
Procedure Clear;
Procedure GetLines(ALines : TStrings);

TInstrumentTrackBar

TInstrumentTrackBar 从基类 TCustomControl 继承其方法。 TXPCustomControl 和 TCustomInstrumentSlider 类提供以下附加方法:

TXPCustomControl:
Procedure UpdateSmoothDraw;
Function  GetModified : Boolean;
Procedure ClearModified;

TCustomInstrumentSlider:
Procedure SetHandleSize(AValue : TInstrumentSize);
Procedure SetMinValue(AValue : Double);
Procedure SetMaxValue(AValue : Double);
Procedure DrawSlot   (ACanvas : TCanvas; xOffset, yOffset : Integer);
Procedure DrawTick   (ACanvas : TCanvas; xOffset, yOffset : Integer; ATicks : TInstrumentTicksFloat; ATickValue : Double; AGraphics : Pointer; APen : Pointer;
Procedure DrawNumber (ACanvas : TCanvas; xOffset, yOffset : Integer; ANumberValue : Double; Const ANumberStr : String);
Procedure DrawHandle (ACanvas : TCanvas; xOffset, yOffset : Integer);
Function  GetPositionFromMouse(X, Y : Integer) : Double;
Function  GetToolTipReferenceRect : TRect;
Procedure DoGetHintText  (AValue : Double; Var AHintText : String);
Procedure DoGetScaleLabel(AValue : Double; Side : TInstrumentSide; Var ALabelString : String)
AI-LocalizedAI 翻译
如您发现任何问题,请选中相关文本/图片,并按 Ctrl + Enter 键向我们提交反馈。
Nav
Contents
功能可用性

您可使用的功能取决于您所采用的 Altium 解决方案——Altium Develop、Altium Agile Teams、Altium Agile Enterprise,或 Altium Designer(在有效订阅期内)。

如果您在实际软件中未看到文档中介绍的某项功能, 请联系 Altium Sales 了解更多信息。

旧版文档

Altium Designer 文档不再提供版本区分。如果您需要访问 Altium Designer 旧版本的文档,请前往其他安装程序页面的旧版文档部分。