这样!一个Form,两个frams在form上放一个panel和二个button,一个frames控件(放在panel上)要求:
点button1时能加载frams1,点button2时加载frams2
点button1时能加载frams1,点button2时加载frams2
解决方案 »
- 如何 stringgrid 实现类似combobox功能
- 请问:DELPHI中的远程文件传送是否必须用C/S方式。有没有直接B/S的? 另谁有具体的例子,发个给我。100在线等候
- 用DELPHI如何发送按键给其他程序?
- 如何将两个RzGroupBar中的所有RzGroup并到一个RzGroupBar中?
- 爱delphi的人们,你们的前途在哪里?
- 请教一个sql语句的问题,令我头都大了!
- ★★★能不能用一条语句实现!!★★★
- 如何将数据进行异地传输(急!!!)
- 【关注有分】华为员工转正答辩试题,并继续请问……
- 怎样连接远程数据库?
- 如何在windows98下成立建立与sql server2000的连接
- ▲高分!请问应如何引用ole的word的注册,谁有把数据库中的数据导入道word书签中的例子。▲
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;type
TForm1 = class(TForm)
Panel1: TPanel;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementationuses Unit2, Unit3;{$R *.DFM}procedure TForm1.Button1Click(Sender: TObject);
var
myframe1: TFrame1;
begin
myframe1 := TFrame1.Create(Self);
myframe1.parent := panel1;
myframe1.Align := alLeft;
end;procedure TForm1.Button2Click(Sender: TObject);
var
myframe2: TFrame2;
begin
myframe2 := TFrame2.Create(Self);
myframe2.parent := panel1;
myframe2.Align := alRight;
end;end.uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;type
TFrame1 = class(TFrame)
Label1: TLabel;
private
{ Private declarations }
public
{ Public declarations }
end;implementation{$R *.DFM}end.uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;type
TFrame2 = class(TFrame)
Label1: TLabel;
private
{ Private declarations }
public
{ Public declarations }
end;implementation{$R *.DFM}end.