Delphi 2009 之 TCategoryPanelGroup[4]: Height


本文整理自网络,侵删。

 
本例效果图:



代码文件:
unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    CategoryPanelGroup1: TCategoryPanelGroup;
    CategoryPanel1: TCategoryPanel;
    CategoryPanel2: TCategoryPanel;
    CategoryPanel3: TCategoryPanel;
    PageScroller1: TPageScroller;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Button4: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  CategoryPanel1.Height := ClientHeight div 2;
  CategoryPanel2.Height := CategoryPanel1.Height;
  CategoryPanel3.Height := CategoryPanel1.Height;

  CategoryPanel1.Caption := 'CPanel1';
  CategoryPanel2.Caption := 'CPanel2';
  CategoryPanel3.Caption := 'CPanel3';

  CategoryPanelGroup1.GradientBaseColor := clYellow;
  CategoryPanelGroup1.GradientColor := clRed;
  CategoryPanel1.Color := clWhite;

  Button1.Caption := 'CategoryPanelGroup1.HeaderHeight +';
  Button2.Caption := 'CategoryPanelGroup1.HeaderHeight -';
  Button3.Caption := 'CategoryPanel1.Height +';
  Button4.Caption := 'CategoryPanel1.Height -';
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  CategoryPanelGroup1.HeaderHeight := CategoryPanelGroup1.HeaderHeight + 2;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  CategoryPanelGroup1.HeaderHeight := CategoryPanelGroup1.HeaderHeight - 2;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  CategoryPanel1.Height := CategoryPanel1.Height + 10;
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
  CategoryPanel1.Height := CategoryPanel1.Height - 10;
end;

end.

相关阅读 >>

Delphi 字符串截取

Delphi 移动windows开始按钮到任务栏中的任何位置

Delphixe4 版本中,已针对移动平台 引入了 arc 模型

Delphi idhttp控件:get/post 请求

Delphi 将自己的app.ico应用程序图表添加到dephi资源文件res中

Delphi tmsweb core webhttprequest1提交json数据

Delphi 学习使用资源文件 - 字符串资源

Delphi 横竖屏代码控制

Delphi xe7开发的直接以管理员模式启动cmd命令行界面

Delphi xe2支持zip压缩文件的操作了

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



打赏

取消

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

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

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

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

评论

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