为什么动态创建的Button控件改变不了Heigth!(10分)

J

Jj1985

Unregistered / Unconfirmed
GUEST, unregistred user!
SpeedButton:=TButton.Create(self);
SpeedButton.Parent:=self;
SpeedButton.Left:=(i+1)*200;
SpeedButton.Top:=300;
SpeedButton.Height:=50;
SpeedButton.Width:=180;
SpeedButton.Font.Size:=20;
SpeedButton.Caption:=trim(ADOQuery1.fieldbyname('name').AsString);
别的属性都改变了. 就是高度和字体大小不变. 为什么!
 
做客房系统的吧
 
试试创建后SetBounds
 
我还想用bitbtn呢
 
奇怪得很啊,是可以改变的啊。
 
我用bitbtn动态生成了
 
你是不是放在ToolBar上的?
 
诡异!
建议用StringGrid
 
btn.autosize=false
 

SpeedButton.Font.Size:=20;
放到前面。
 
http://bbs.softyes.com/viewthread.php?tid=282&extra=page%3D1&frombbs=1
用bitbtn
 
顶部