TPageControl控件,两个page之间不能插入一个new page的啊? TPageControl控件,两个page之间不能插入一个new page的啊?初学只知道能delete page。不知道在两个page之间怎么再插入一个newpage。大伙给点操作步骤。谢谢了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 已经有两个TabSheet,假设为tsA,tsB,其TabIndex分别为0,1,然后新建立一个TabSheet,假设为tsC,此时该tsC的TabIndex应该为2。设置tsC的TabIndex为1,tsB的TabIndex为2,这时候在PageControl上TabSheet的顺序就是tsA、tsC、tsB啦,相当于在tsA、tsB中新插入了一个tsC。 unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Tabs, ComCtrls;type TForm1 = class(TForm) Button1: TButton; PageControl1: TPageControl; TabSheet1: TTabSheet; TabSheet2: TTabSheet; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);var TabSheet : TTabSheet;begin TabSheet := TTabSheet.Create(PageControl1); TabSheet.PageControl := PageControl1; TabSheet.Caption := 'Test Insert'; TabSheet.PageIndex := 1;end;end.object Form1: TForm1 Left = 226 Top = 155 Width = 870 Height = 640 Caption = 'Form1' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 object Button1: TButton Left = 184 Top = 320 Width = 75 Height = 25 Caption = 'Button1' TabOrder = 0 OnClick = Button1Click end object PageControl1: TPageControl Left = 288 Top = 224 Width = 289 Height = 193 ActivePage = TabSheet2 TabOrder = 1 object TabSheet1: TTabSheet Caption = 'TabSheet1' end object TabSheet2: TTabSheet Caption = 'TabSheet2' ImageIndex = 1 end endend VC怎么转换成delphi,回调函数 Delphi双向链表的问题 Stringgrid的滚动条问题 做为一个DELPHI的编程人员,数据库要学到什么程度啊? 关于socket的无知,请大家指教 简单问题 怎样控制right,left,up,down这四个按钮?怎样备份access数据库? 如何让程序在17寸的显示器上或在15寸的显示器上运行,显示效果都一样! 请问,建表的时候,编号字段的类型,是自动添加好,还是用户自己输 关于清空TDbLookupCombobox控件的问题。 关于VFP的奇怪问题 关于图象校正
设置tsC的TabIndex为1,tsB的TabIndex为2,这时候在PageControl上TabSheet的顺序就是tsA、tsC、tsB啦,相当于在tsA、tsB中新插入了一个tsC。
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Tabs, ComCtrls;type
TForm1 = class(TForm)
Button1: TButton;
PageControl1: TPageControl;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var
TabSheet : TTabSheet;
begin
TabSheet := TTabSheet.Create(PageControl1);
TabSheet.PageControl := PageControl1;
TabSheet.Caption := 'Test Insert';
TabSheet.PageIndex := 1;
end;end.object Form1: TForm1
Left = 226
Top = 155
Width = 870
Height = 640
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 184
Top = 320
Width = 75
Height = 25
Caption = 'Button1'
TabOrder = 0
OnClick = Button1Click
end
object PageControl1: TPageControl
Left = 288
Top = 224
Width = 289
Height = 193
ActivePage = TabSheet2
TabOrder = 1
object TabSheet1: TTabSheet
Caption = 'TabSheet1'
end
object TabSheet2: TTabSheet
Caption = 'TabSheet2'
ImageIndex = 1
end
end
end