Delphi TRzPageControl动态窗体自工作栏的实现

本文介绍了如何在Delphi中使用TRzPageControl动态添加和显示窗体。通过调用PageAddForm方法,创建TForm2类的实例并将其手动停靠到PageControl的最后一个页面,实现自工作栏的功能。点击按钮btn1即可触发此过程。
unit Unit1;


interface


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


type
  TForm1 = class(TForm)
    Page1: TRzPageControl;
    procedure btn1Click(Sender: TObject);
  private
      procedure PageAddForm(mform:TForm;TmFormClass:TClass);
    { Private declarations }
  public
    { Public declarations }
  end;


var
  Form1: TForm1;


implementation


{$R *.dfm}


procedure TForm1.btn1Click(Sender: TObject);
begin
  PageAddForm(Form2,TForm2);
end;


procedure TForm1.PageAddForm(mform: TForm; TmFormClass: TClass);
begin
      application.CreateForm(TForm,TmFormClass);//创建窗体对象
    mForm.ManualDock(page1);  //设置窗体停靠的容器
    mForm.Visible :=true; //这种方法的效果比用 show的效果要好一些
    page1.ActivePageIndex :=page1.PageCount-1;
end;


end.
Raize Components 6.1.12 Modifications The following is a list of all of the modifications that have been made for version 6.1.12 of Raize Components. For a list of all modifications made to previous versions of Raize Components 6, please see the "RC 6 Modifications.txt" file. -------------------------------------------------------------------------------- Build: 6.1.12 Date: 11 Apr 2015 -------------------------------------------------------------------------------- Added support for Embarcadero RAD Studio XE8. Supported IDEs Embarcadero RAD Studio XE8 -- Delphi XE8 & C++Builder XE8 Embarcadero RAD Studio XE7 -- Delphi XE7 & C++Builder XE7 Embarcadero RAD Studio XE6 -- Delphi XE6 & C++Builder XE6 Embarcadero RAD Studio XE5 -- Delphi XE5 & C++Builder XE5 Embarcadero RAD Studio XE4 -- Delphi XE4 & C++Builder XE4 Embarcadero RAD Studio XE3 -- Delphi XE3 & C++Builder XE3 Embarcadero RAD Studio XE2 -- Delphi XE2 & C++Builder XE2 Embarcadero RAD Studio XE -- Delphi XE & C++Builder XE Embarcadero RAD Studio 2010 -- Delphi 2010 & C++Builder 2010 CodeGear RAD Studio 2009 -- Delphi 2009 & C++Builder 2009 RzButton.pas * Fixed issue in TRzToolButton where drop down menu would be displayed on the adjacent monitor under certainly situations. RzDBEdit.pas * Fixed issue in TRzDBEdit and descendants where registered style hook was not correctly unregistered when the hook was no longer needed. * Added UseFormatToParse property to TRzDateTimeEdit. Set this property to True in situations where the Time to be parsed contains more elements than are contained in the LongTimeFormat string. For example, if the Time needed to be entered must have 'hh:nn:ss.zzz' and the LongTimeFormat string is set to 'hh:nn', then set the UseFormatToParse to True and set the Format property to the desired format string. RzDBList.pas * Surface the Sorted property in TRzDBListBox. RzEdit.pas * Fixed issue in TRzEdit and descendants where registered style hook was not correctly unregistered when the hook was no longer needed. * Added UseFormatToParse property to TRzDateTimeEdit. Set this property to True in situations where the Time to be parsed contains more elements than are contained in the LongTimeFormat string. For example, if the Time needed to be entered must have 'hh:nn:ss.zzz' and the LongTimeFormat string is set to 'hh:nn', then set the UseFormatToParse to True and set the Format property to the desired format string. RzGroupBar.pas * Fixed issue in TRzGroupBar where registered style hook was not correctly unregistered when the hook was no longer needed. RzLstBox.pas * Fixed issue in TRzListBox and descendants where text in item hints would get clipped if the TRzBalloonHints component was also being used in the application. RzShellCtrls.pas * When dragging a file from a TRzShellList and dropping it onto a different folder in the associated TRzShellTree, the shell tree no longer scrolls to the source folder represented by the shell list. That is, the shell tree maintains its current view. RzSpnEdt.pas * Fixed issue where ParentColor property in TRzSpinner and TRzDBSpinner was not getting streamed correctly to form files. RzTabs.pas * Fixed issue where drop-down menu in TRzPageControl and TRzTabControl would not be displayed correctly when using a custom VCL Style in XE6 or XE7. * Added LightenUnselectedColoredTabs property to TRzPageControl and TRzTabControl. When this property is True, a non-active colored tab will be displayed with a lightened version of the tab color. When this property is False, the unselected tab is displayed in the same color as the active tab color. --------------------------------------------------------------------------------
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值