Điều khiển thiết bị

Sơ lược

Khám phá các điều khiển thiết bị đo có trong môi trường viết script của Altium Designer, cùng tài liệu tham khảo về các phương thức của thành phần và quan hệ kế thừa từ Delphi VCL. Bài viết này hướng dẫn cách kiểm tra các thuộc tính và sự kiện, tìm phương thức bằng tính năng Hoàn thành mã, cũng như tìm hiểu các điều khiển như nút bấm, đồng hồ đo và màn hình hiển thị. Bài viết cũng lưu ý rằng khả năng hỗ trợ thiết kế FPGA để giám sát và điều khiển tín hiệu bằng thiết bị đo tùy chỉnh đã chấm dứt kể từ Altium Designer 18.0. Hãy đọc tiếp để tìm thông tin tham khảo cần thiết cho công việc viết script của bạn.

- Tìm các thuộc tính và sự kiện của điều khiển trong bảng Object Inspector, đồng thời khám phá các phương thức bằng tổ hợp phím Ctrl+Space.
- Nắm rõ những phương thức mà các điều khiển kế thừa từ các lớp VCL và những phương thức bổ sung mà chúng cung cấp.
- Tra cứu tài liệu tham khảo về phương thức của từng thành phần, đồng thời lưu ý giới hạn hỗ trợ FPGA.
Tìm hiểu sâu hơn với AI:

Thẻ Tool Palette's Instrument Controls chứa các thành phần (điều khiển) dùng để thiết kế GUI cho bảng điều khiển Custom Instrument trong Altium Designer. Các điều khiển này được thiết kế riêng để sử dụng với Custom Instrument.

Mặc dù các điều khiển thiết bị đo có sẵn để sử dụng trong môi trường viết tập lệnh của Altium Designer, lưu ý rằng kể từ phiên bản 18.0, Altium Designer không còn hỗ trợ các thiết kế FPGA trong đó tín hiệu có thể được giám sát và điều khiển bằng thiết bị đo tùy chỉnh.
Mặc dù các điều khiển thiết bị đo có sẵn để sử dụng trong môi trường viết tập lệnh của Altium NEXUS, lưu ý rằng Altium NEXUS không hỗ trợ các thiết kế FPGA trong đó tín hiệu có thể được giám sát và điều khiển bằng thiết bị đo tùy chỉnh.

► Xem GUI của Custom Instrument - Các điều khiển thiết bị đo có sẵn để biết mô tả chức năng của từng điều khiển thiết bị đo.

Để xem các thuộc tính và sự kiện liên quan của một thành phần điều khiển thiết bị đo được đặt trên biểu mẫu tập lệnh, hãy sử dụng thẻ Properties hoặc Events trong bảng Object Inspector (View » Panels » Object Inspector).

Để tìm một phương thức (hoặc thuộc tính) cụ thể của điều khiển thiết bị đo, hãy sử dụng tính năng tự động hoàn thành mã (xem Công cụ trình soạn thảo tập lệnh). Ví dụ: khi nhập TInstrumentCheckBox.get, cửa sổ tự động hoàn thành mã sẽ hiển thị danh sách các phương thức và thuộc tính đã được lọc phù hợp cho thành phần TInstrumentCheckBox . Sử dụng Ctrl+Space để mở cửa sổ tự động hoàn thành mã theo cách thủ công.

Sử dụng tính năng tự động hoàn thành mã (Ctrl+Space) để xem các phương thức hoặc thuộc tính có sẵn của một thành phần.
Sử dụng tính năng tự động hoàn thành mã (Ctrl+Space) để xem các phương thức hoặc thuộc tính có sẵn của một thành phần.

Tính kế thừa

Phần lớn các lớp điều khiển thiết bị đo kế thừa các phương thức (cũng như thuộc tính và sự kiện) từ các lớp cơ sở TGraphicControl hoặc TCustomControl của Delphi VCL. Vì vậy, các phương thức điều khiển thiết bị đo được trình bày ở đây là phần bổ sung cho các phương thức của một trong những lớp cơ sở đó, như được ghi chú trong từng mục tham khảo.

Ví dụ: chuỗi kế thừa theo thứ tự từ lớp cơ sở xuống lớp dẫn xuất của điều khiển TInstrumentCheckBox như sau:

Chuỗi kế thừa Phương thức
TGraphicControl Xem tài liệu tham khảo Delphi tương ứng.
    TCustomInstrumentCheckBox Xem mục TXPCheckBox bên dưới.
        TInstrumentCheckBox Xem mục TXPCheckBox bên dưới.

Phương thức của thành phần

Các thành phần điều khiển thiết bị đo của Altium được xây dựng dựa trên các lớp cốt lõi của Embarcadero Visual Component Library (VCL). Mỗi điều khiển thiết bị đo kế thừa các phương thức, thuộc tính và sự kiện từ lớp VCL gốc, đồng thời hầu hết đều cung cấp thêm các phương thức tùy chỉnh. Ví dụ: cả thành phần TInstrumentCheckBox và thành phần tiêu chuẩn TCheckBox đều cung cấp phương thức Click, trong khi thành phần TInstrumentCheckBox còn cung cấp phương thức Changed.

Sử dụng danh sách sau để chuyển đến thông tin về các phương thức có sẵn của từng thành phần trong danh mục điều khiển thiết bị đo:

TSignalLinkManager Trình quản lý liên kết tín hiệu thiết bị đo.
TInstrumentBackgroundPanel Màu nền bảng điều khiển thiết bị đo.
TInstrumentBackground Màu nền thiết bị đo.
TInstrumentButton Nút nhấn thiết bị đo.
TInstrumentCaption Chú thích bảng điều khiển thiết bị đo.
TInstrumentCheckBox Hộp kiểm thiết bị đo.
TInstrumentEdit Ô nhập liệu thiết bị đo.
TInstrumentGauge Đồng hồ đo thiết bị kiểu analog.
TInstrumentGlyphButton Hình ảnh đồ họa cho nút thao tác nhanh của thiết bị đo.
TInstrumentGraph Màn hình đồ thị thiết bị đo.
TInstrumentKnob Núm xoay điều khiển thiết bị đo.
TInstrumentLabel Nhãn bảng điều khiển thiết bị đo.
TInstrumentLEDDigits Màn hình LED số 7 đoạn.
TInstrumentLEDsPanel Hàng đèn LED chỉ báo theo nhóm.
TInstrumentMultiGraph Màn hình đồ thị nhiều đường tín hiệu.
TInstrumentNumericPanel Bộ hiển thị số của thiết bị đo.
TInstrumentPanel Vùng bảng điều khiển thiết bị đo.
TInstrumentProgressBar Chỉ báo tín hiệu/tiến trình dạng thanh LED
TInstrumentRadioButton Nút chọn loại trừ của thiết bị đo.
TInstrumentRadioGroup Điều khiển nhóm nút chọn loại trừ của thiết bị đo.
TInstrumentScrollbar Điều khiển thanh cuộn của thiết bị đo.
TInstrumentShape Hình dạng hình học trên bảng điều khiển thiết bị đo.
TInstrumentSilkScreen Lớp phủ in lụa trên bảng điều khiển thiết bị đo.
TInstrumentTerminal Cửa sổ đầu cuối hiển thị ký tự của thiết bị đo.
TInstrumentTrackBar Điều khiển thanh trượt của thiết bị đo.

TSignalLinkManager

TSignalLinkManager kế thừa các phương thức từ lớp cơ sở TComponent. Lớp TSignalLinkManager cung cấp thêm các phương thức sau:

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

TInstrumentBackgroundPanel

TInstrumentBackgroundPanel kế thừa các phương thức từ lớp cơ sở TCustomControl. Các lớp TXPCustomControl, TXPCustomExtPanel và TCustomInstrumentBackgroundPanel cung cấp thêm các phương thức sau:

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 kế thừa các phương thức từ lớp cơ sở TGraphicControl. Các lớp TCustomGraphicInstrumentWithBackground và TCustomGraphicInstrumentWithInterior cung cấp thêm các phương thức sau:

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 kế thừa các phương thức từ lớp cơ sở TCustomControl. Các lớp TXPCustomControl, TXPCustomTransparentControl, TXPBaseCustomSpeedButton, TXPCustomSpeedButton và TCustomInstrumentButton cung cấp thêm các phương thức sau:

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 kế thừa các phương thức từ lớp cơ sở TCustomLabel. Lớp TCustomInstrumentLabel cung cấp thêm phương thức sau:

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

TInstrumentCheckBox

TInstrumentCheckBox kế thừa các phương thức từ lớp cơ sở TGraphicControl. Lớp TCustomInstrumentCheckBox cung cấp thêm phương thức sau:

TCustomInstrumentCheckBox:
Procedure Changed;

TInstrumentEdit

TInstrumentEdit kế thừa các phương thức từ lớp cơ sở TCustomControl. Các lớp TXPCustomControl và TCustomXPEdit cung cấp thêm các phương thức sau:

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 kế thừa các phương thức từ lớp cơ sở TGraphicControl. Các lớp TCustomGraphicInstrumentWithBackground, TCustomGraphicInstrumentWithNoise và TCustomInstrumentGauge cung cấp thêm các phương thức sau:

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 kế thừa các phương thức từ lớp cơ sở TCustomControl. Các lớp TXPCustomControl, TXPCustomTransparentControl, TXPBaseCustomSpeedButton, TXPCustomSpeedButton, TCustomInstrumentButton và TCustomInstrumentGlyphButton cung cấp thêm các phương thức sau:

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 kế thừa các phương thức từ lớp cơ sở TGraphicControl. Các lớp TCustomGraphicInstrumentWithBackground, TCustomGraphicInstrumentWithInterior và TCustomInstrumentGraph cung cấp thêm các phương thức sau:

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 kế thừa các phương thức từ lớp cơ sở TCustomControl. Các lớp TXPCustomControl và TCustomInstrumentSlider cung cấp thêm các phương thức sau:

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 kế thừa các phương thức từ lớp cơ sở TCustomLabel. Lớp TCustomInstrumentLabel cung cấp thêm phương thức sau:

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

TInstrumentLEDDigits

TInstrumentLEDDigit kế thừa các phương thức từ lớp cơ sở TGraphicControl. Các lớp TCustomGraphicInstrumentWithBackground, TCustomGraphicInstrumentWithInterior,
TCustomInstrumentDigitsPanel và TCustomInstrumentLEDDigits cung cấp thêm các phương thức sau:

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 kế thừa các phương thức từ lớp cơ sở TGraphicControl. Các lớp TCustomGraphicInstrumentWithBackground, TCustomGraphicInstrumentWithInterior,
TCustomInstrumentDigitsPanel và TCustomInstrumentLEDsPanel cung cấp thêm các phương thức sau:

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 kế thừa các phương thức từ lớp cơ sở TGraphicControl. Các lớp TCustomGraphicInstrumentWithBackground, TCustomGraphicInstrumentWithInterior và TCustomInstrumentGraph cung cấp thêm các phương thức sau:

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 kế thừa các phương thức từ lớp cơ sở TGraphicControl. Các lớp TCustomGraphicInstrumentWithBackground, TCustomGraphicInstrumentWithInterior,
TCustomInstrumentDigitsPanel và TCustomInstrumentNumericPanel cung cấp thêm các phương thức sau:

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 kế thừa các phương thức từ lớp cơ sở TCustomControl. Các lớp TXPCustomControl và TCustomInstrumentPanel cung cấp thêm các phương thức sau:

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

TCustomInstrumentPanel:
Procedure PaintOnPanel(APanel : TCustomInstrumentBackgroundPanel);

TInstrumentProgressBar

TInstrumentProgressBar kế thừa các phương thức từ lớp cơ sở TGraphicControl. Các lớp TCustomGraphicInstrumentWithBackground, TCustomGraphicInstrumentWithNoise và TCustomInstrumentProgressBar cung cấp thêm các phương thức sau:

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 kế thừa các phương thức từ lớp cơ sở TGraphicControl. Các lớp TCustomInstrumentCheckBox và TCustomInstrumentRadioButton cung cấp các phương thức bổ sung sau:

TCustomInstrumentCheckBox:
Procedure Changed;

TCustomInstrumentRadioButton:
Procedure TurnSiblingsOff;

TInstrumentRadioGroup

TInstrumentRadioGroup kế thừa các phương thức từ lớp cơ sở TCustomControl. Các lớp TXPCustomControl và TCustomInstrumentPanel cung cấp các phương thức bổ sung sau:

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

TCustomInstrumentPanel:
Procedure PaintOnPanel(APanel : TCustomInstrumentBackgroundPanel);

TInstrumentScrollbar

TInstrumentScrollbar kế thừa các phương thức từ lớp cơ sở TCustomControl. Các lớp TXPCustomControl, TCustomXPScrollBar và TCustomInstrumentScrollBar cung cấp các phương thức bổ sung sau:

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 kế thừa các phương thức từ lớp thành phần cơ sở TShape.

TInstrumentSilkScreen

TInstrumentSilkScree kế thừa các phương thức từ lớp cơ sở TCustomControl. Lớp TXPCustomControl cung cấp các phương thức bổ sung sau:

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

TInstrumentTerminal

TInstrumentTerminal kế thừa các phương thức từ lớp cơ sở TCustomControl. Các lớp TXPCustomControl, TCustomInstrumentPanel và TCustomInstrumentTerminal cung cấp các phương thức bổ sung sau:

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 kế thừa các phương thức từ lớp cơ sở TCustomControl. Các lớp TXPCustomControl và TCustomInstrumentSlider cung cấp các phương thức bổ sung sau:

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-LocalizedBản địa hóa bằng AI
Nếu bạn phát hiện vấn đề, hãy chọn văn bản/hình ảnh và nhấnCtrl + Enterđể gửi phản hồi cho chúng tôi.
Nav
Contents
Tính khả dụng của tính năng

Các tính năng bạn có thể sử dụng phụ thuộc vào giải pháp Altium mà bạn đang có – Altium Develop, Altium Agile Teams, Altium Agile Enterprise, hoặc Altium Designer (đang trong thời hạn hiệu lực).

Nếu bạn không thấy một tính năng được nêu trong tài liệu có trong phần mềm thực tế của mình, liên hệ Bộ phận Kinh doanh của Altium để tìm hiểu thêm.

Tài liệu cũ

Tài liệu Altium Designer không còn được phân phiên bản. Nếu bạn cần truy cập tài liệu cho các phiên bản cũ hơn của Altium Designer, hãy truy cập mục Tài liệu cũ trên trang Trình cài đặt khác.