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

📄 thmbardlg.~pas

📁 delphi 和mapx联合开发的例程 实现mapx的相应功能
💻 ~PAS
字号:
unit ThmBarDlg;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,MapXLib_TLB, ExtCtrls, Buttons;

type
  TThmBarFrm = class(TForm)
    Label1: TLabel;
    Edit1: TEdit;
    Label2: TLabel;
    Edit2: TEdit;
    Label3: TLabel;
    Edit3: TEdit;
    GroupBox1: TGroupBox;
    Label4: TLabel;
    Button2: TButton;
    Button3: TButton;
    ComboBox1: TComboBox;
    ColorDialog1: TColorDialog;
    RadioGroup1: TRadioGroup;
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    BitBtn1: TBitBtn;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    ColorArr: Array of TColor;
    procedure FormShow(MaxV,MaxH,MaxW: double; Stacked: Boolean; CArr: Array of TColor; Count: integer);
  end;

var
  ThmBarFrm: TThmBarFrm;

implementation

{$R *.dfm}

procedure TThmBarFrm.FormShow(MaxV,MaxH,MaxW: double; Stacked: Boolean; CArr: Array of TColor; Count: integer);
var
  i: integer;
begin
  ThmBarFrm:= TThmBarFrm.Create(nil);
  with ThmBarfm do
  begin
    Edit1.Text:= floattostr(Maxv);
    Edit2.Text:= floattostr(MaxH);
    Edit3.Text:= floattostr(MaxW);
    if not Stacked then RadioButton1.Checked:= true
    else RadioButton2.Checked:= true;
    ComboBox1.Clear;
    SetLength(ColorArr,Count);
    for i:= 1 to Count do
    begin
      ComboBox1.Items.Add(inttostr(i));
      ColorArr[i-1]:= CArr[i-1];
    end;
    ShowModal;
  end;
end;

procedure TThmBarFrm.BitBtn1Click(Sender: TObject);
begin
    if ComboBox1.Text <> '' then
  begin
    if Self.ColorDialog1.Execute then
    begin
      ColorArr[ComboBox1.ItemIndex]:= ColorDialog1.Color;
      BitBtn1.Font.Color:= ColorDialog1.Color;
    end;
  end;
end;

procedure TThmBarFrm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action:=Cafree;
  self:= nil;
end;





end.

⌨️ 快捷键说明

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