Delphi TTabControl控件使用


本文整理自网络,侵删。

 

unit Unit1;

 

interface

 

uses

  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,

  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls;

 

type

  TForm1 = class(TForm)

    tbc1: TTabControl;

    btn1: TButton;

    btn2: TButton;

    btn3: TButton;

    procedure btn3Click(Sender: TObject);

    procedure btn2Click(Sender: TObject);

    procedure btn1Click(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;

 

var

  Form1: TForm1;

 

implementation

 

{$R *.dfm}

 

procedure TForm1.btn3Click(Sender: TObject);

begin

  tbc1.Tabs.Insert(2,'插入Tab');

end;

 

procedure TForm1.btn1Click(Sender: TObject);

begin

  tbc1.Tabs.Delete(1);

end;

 

procedure TForm1.btn2Click(Sender: TObject);

begin

  tbc1.Tabs.Add('新增Tab');

end;

end.

 

来源:https://www.cnblogs.com/YiShen/p/9726420.html

相关阅读 >>

Delphi图片上写水印文字函数

Delphi 判断奇数偶数

Delphi adoconnection1连接mssql数据库方法

Delphi 判断文件是否被占用

Delphi 获取本地计算机上的com口列表

Delphi 字符串前后翻转

sqlite报错database is locked的解决办法

Delphi string转为olevariant

Delphi 中string字符串转换byte[]字节数组

Delphi中tinifile类 操作ini文件

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...