P pzning Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-23 #1 请问两个panel, 其中一个在另一个panel中,居中显示,不管第一个panel如何变大第二个panel 都是以原来状态居中显示。谢谢
Q QuickSilver Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-23 #2 panel2在panel1里 procedure TForm1.Panel1Resize(Sender: TObject); begin panel2.top:=panel1.top+(panel1.Height-panel2.height) div 2; panel2.Left:=panel1.Left+(panel1.width-panel2.Width) div 2; end;
panel2在panel1里 procedure TForm1.Panel1Resize(Sender: TObject); begin panel2.top:=panel1.top+(panel1.Height-panel2.height) div 2; panel2.Left:=panel1.Left+(panel1.width-panel2.Width) div 2; end;
N nikon Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-23 #3 楼上的答案很准确啊。具体讲解可以参考DELPHI 5开发人员指南第4章