我在窗体上使用了一个StatusBar1,并新建了4的Panels,怎样让这个四个Panel的长度分别为屏幕宽度的百分之25?
解决方案 »
- 谁有像软件安装的下一步/上一步的功能的控件
- 如何解决服务端程序经常出错
- Delphi异常
- 如何在Delphi中实现对SQL sever中图像(image)的加密
- 求SQL语句
- 紧急求助!!!!help me .....大哥哥们。。。
- 关于messagedlg的问题。
- 现在的贴子怎么没有了提前的功能?
- 关于DBGRID的问题,很简单,请指教,有原代码!
- 我想拜个老师学习delphi数据库编程,50分见面礼,若答应收我为徒,再送50分拜师礼,呵呵,各位大虾请多帮忙呀 !
- CSDN人气太差,好多问题得不到解决,请推荐新的论坛。。。
- 当把TDataSetProvider的UpdateMode设置成upWhereKeyOnly是,使用TClientDataSet的ApplyUpdates()更新数据,应注意什么。
var
a:integer;
begin
a:=form1.Width div 4;
//showmessage(floattostr(a));
with statusbar1 do
begin
panels[0].Width:=a;
panels[1].Width:=a;
panels[2].Width:=a;
end;
end;
Delphi syntax:procedure ScaleBy(M, D: Integer);C++ syntax:void __fastcall ScaleBy(int M, int D);DescriptionScaleBy resizes a control without moving its upper left corner. This is similar to changing the Height and Width properties, but the control also attempts to rescale and rearrange any child controls to maintain their relative size and placement.The M and D parameters define a multiplier and divisor by which to scale the control. For example, to make a control 75% of its original size, specify the value of M as 75, and the value of D as 100. Any pair of values that has the same ratio has the same effect. Thus M = 3 and D = 4 also makes the control 75% of its previous size.To rescale the control抯 children without rescaling the control itself, use ScaleControls.