⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imp_stdctrls.pas

📁 Delphi脚本控件
💻 PAS
📖 第 1 页 / 共 2 页
字号:
////////////////////////////////////////////////////////////////////////////
// PAXScript Importing
// Author: Alexander Baranovsky (ab@cable.netlux.org)
// ========================================================================
// Copyright (c) Alexander Baranovsky, 2003. All rights reserved.                                  
// Code Version: 1.5
// ========================================================================
// Unit: IMP_StdCtrls.pas
// ========================================================================
////////////////////////////////////////////////////////////////////////////

// Imports classes:
//
//   TButton
//   TButtonControl
//   TCheckBox
//   TComboBox
//   TCustomCheckBox
//   TCustomComboBox
//   TCustomEdit
//   TCustomGroupBox
//   TCustomLabel
//   TCustomListBox
//   TCustomMemo
//   TEdit
//   TGroupBox
//   TLabel
//   TListBox
//   TMemo
//   TRadioButton
//   TScrollBar
//   TStaticText

unit IMP_StdCtrls;
interface
uses
  Classes,
{$IFDEF LINUX}
  Types,
  QGraphics,
  QStdCtrls,
{$ELSE}
  Graphics,
  StdCtrls,
{$ENDIF}
  PaxScripter;

type
  TMemoStrings = class(TStrings);
  TListBoxStrings = class(TStrings);
  TCustomComboBoxStrings = class(TStrings);
  TComboBoxStrings = class(TCustomComboBoxStrings);


implementation

// --------------TCustomComboBox------------------------------------------------

function TCustomComboBox_GetCharCase: TEditCharCase;
begin
 result := TCustomComboBox(_Self).CharCase;
end;

procedure TCustomComboBox_SetCharCase(Value: TEditCharCase);
begin
 TCustomComboBox(_Self).CharCase := Value;
end;

function TCustomComboBox_GetCanvas: TCanvas;
begin
 result := TCustomComboBox(_Self).Canvas;
end;

function TCustomComboBox_GetDroppedDown: Boolean;
begin
 result := TCustomComboBox(_Self).DroppedDown;
end;

procedure TCustomComboBox_SetDroppedDown(Value: Boolean);
begin
 TCustomComboBox(_Self).DroppedDown := Value;
end;

function TCustomComboBox_GetItems: TStrings;
begin
 result := TCustomComboBox(_Self).Items;
end;

procedure TCustomComboBox_SetItems(Value: TStrings);
begin
 TCustomComboBox(_Self).Items := Value;
end;

function TCustomComboBox_GetItemIndex: Integer;
begin
 result := TCustomComboBox(_Self).ItemIndex;
end;

procedure TCustomComboBox_SetItemIndex(Value: Integer);
begin
 TCustomComboBox(_Self).ItemIndex := Value;
end;

function TCustomComboBox_GetSelLength: Integer;
begin
 result := TCustomComboBox(_Self).SelLength;
end;

procedure TCustomComboBox_SetSelLength(Value: Integer);
begin
 TCustomComboBox(_Self).SelLength := Value;
end;

function TCustomComboBox_GetSelStart: Integer;
begin
 result := TCustomComboBox(_Self).SelStart;
end;

procedure TCustomComboBox_SetSelStart(Value: Integer);
begin
 TCustomComboBox(_Self).SelStart := Value;
end;

function TCustomComboBox_GetSelText: string;
begin
 result := TCustomComboBox(_Self).SelText;
end;

procedure TCustomComboBox_SetSelText(const Value: string);
begin
 TCustomComboBox(_Self).SelText := Value;
end;

//----------TCustomEdit --------------------------------------------------------

function TCustomEdit_GetModified: Boolean;
begin
 result := TCustomEdit(_Self).Modified;
end;

procedure TCustomEdit_SetModified(Value: Boolean);
begin
 TCustomEdit(_Self).Modified := Value;
end;

function TCustomEdit_GetSelLength: Integer;
begin
 result := TCustomEdit(_Self).SelLength;
end;

procedure TCustomEdit_SetSelLength(Value: Integer);
begin
 TCustomEdit(_Self).SelLength := Value;
end;

function TCustomEdit_GetSelStart: Integer;
begin
 result := TCustomEdit(_Self).SelStart;
end;

procedure TCustomEdit_SetSelStart(Value: Integer);
begin
 TCustomEdit(_Self).SelStart := Value;
end;

function TCustomEdit_GetSelText: string;
begin
 result := TCustomEdit(_Self).SelText;
end;

procedure TCustomEdit_SetSelText(const Value: string);
begin
 TCustomEdit(_Self).SelText := Value;
end;

//--------------------TCustomListBox--------------------------------------------
function TCustomListBox_GetCanvas: TCanvas;
begin
 result := TCustomListBox(_Self).Canvas;
end;

function TCustomListBox_GetItems: TStrings;
begin
 result := TCustomListBox(_Self).Items;
end;

procedure TCustomListBox_SetItems(Value: TStrings);
begin
 TCustomListBox(_Self).Items := Value;
end;

function TCustomListBox_GetItemIndex: Integer;
begin
 result := TCustomListBox(_Self).ItemIndex;
end;

procedure TCustomListBox_SetItemIndex(Value: Integer);
begin
 TCustomListBox(_Self).ItemIndex := Value;
end;

function TCustomListBox_GetSelCount: Integer;
begin
 result := TCustomListBox(_Self).SelCount;
end;

function TCustomListBox_GetSelected(Index: Integer): Boolean;
begin
 result := TCustomListBox(_Self).Selected[Index];
end;

procedure TCustomListBox_SetSelected(Index: Integer; Value: Boolean);
begin
 TCustomListBox(_Self).Selected[Index] := Value;
end;

function TCustomListBox_GetTopIndex: Integer;
begin
 result := TCustomListBox(_Self).TopIndex;
end;

procedure TCustomListBox_SetTopIndex(Value: Integer);
begin
 TCustomListBox(_Self).TopIndex := Value;
end;

//---------------------TListBox-------------------------------------------------
function TListBox_GetItemIndex: Integer;
begin
  result := TListBox(_Self).ItemIndex;
end;

var
  H: Integer;

initialization

  RegisterClassType(TMemoStrings, -1);
  RegisterClassType(TListboxStrings, -1);
  RegisterClassType(TComboBoxStrings, -1);
  RegisterClassType(TCustomComboBoxStrings, -1);


  H := RegisterNamespace('StdCtrls');

//---- TButton -----------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -