procedure TForm1.BitBtn6Click(Sender: TObject);
var
selectForm:TForm;
btnOK,btnCancel:TButton;
begin
{Form}
selectForm:=TForm.Create(nil);
selectForm.Parent:=self.Parent;
selectForm.Name:='selectForm';
selectForm.Caption:='Please select One';
selectForm.Position:=poOwnerFormCenter;
selectForm.BorderStyle:=bsDialog;
{Button}
btnOK:=TButton.Create(nil);
btnOK.Parent:=selectForm;
btnOK.Name:='btnOK';
btnOK.Caption:='确定';
btnOK.Top:=selectForm.Height-btnOK.Height*2;
selectForm.ShowModal;
selectForm.Free;
end; btnOK.Top:=selectForm.Height-btnOK.Height*2; 只能把Button的位置放在Form的最底边(Button的Bottom和Form的Bottom是一条线),为什么要*2?
var
selectForm:TForm;
btnOK,btnCancel:TButton;
begin
{Form}
selectForm:=TForm.Create(nil);
selectForm.Parent:=self.Parent;
selectForm.Name:='selectForm';
selectForm.Caption:='Please select One';
selectForm.Position:=poOwnerFormCenter;
selectForm.BorderStyle:=bsDialog;
{Button}
btnOK:=TButton.Create(nil);
btnOK.Parent:=selectForm;
btnOK.Name:='btnOK';
btnOK.Caption:='确定';
btnOK.Top:=selectForm.Height-btnOK.Height*2;
selectForm.ShowModal;
selectForm.Free;
end; btnOK.Top:=selectForm.Height-btnOK.Height*2; 只能把Button的位置放在Form的最底边(Button的Bottom和Form的Bottom是一条线),为什么要*2?
解决方案 »
- 来人啊!delphi 怎样清除 image的canvas 中lines的画线
- 如何清除ClientDataSet1的所有数据和所有字段啊
- 奇怪问题:明明是个文件夹却判断不出来
- Delphi7读写Oracle10g表问题(新手,救命啊!)
- 谁有infoPower2000 for delphi5的安装包(不是试用版本的)
- 请问WebBrowser如何修改HTTP头?
- 往数据集中输入数据时,当移到下一条记录时,上一条记录自动清空?
- 请问有关异常类:
- 关于用socket拷贝整个文件夹问题
- Fmx::Graphics::TBitmap::ApplyMask函数二进制代码在哪个库里?为啥默认无法链接?
- 怎么得到二个日期的间隔天数?
- 注册表的二进制值
self.Hide;//开头加
selectForm.BorderStyle:=bsNone;
btnOK.Top:=selectForm.Height-btnOK.Height;
self.Show;//结尾加