界面库
整理代码
This commit is contained in:
+407
-1019
File diff suppressed because it is too large
Load Diff
@@ -5935,14 +5935,44 @@ type tcustomprogressbar=class(TCustomControl)
|
||||
if Fvertical then
|
||||
begin
|
||||
d := rt *h;
|
||||
br[0] +=(h-d);
|
||||
br[1] +=(h-d);
|
||||
end else
|
||||
begin
|
||||
d := floor(rt*w);
|
||||
br[2] := br[0]+d;
|
||||
end
|
||||
dc.brush.color := FbarColor;
|
||||
dc.FillRect(br);
|
||||
dc.FillRect(br);
|
||||
if not Fsmooth then
|
||||
begin
|
||||
pc := dc.pen.Color;
|
||||
pw := dc.pen.Width;
|
||||
dc.pen.Color := color;
|
||||
dc.pen.Width := 2;
|
||||
sp := 18;
|
||||
if Fvertical then
|
||||
begin
|
||||
p := br[3]-sp;
|
||||
while p>br[1] do
|
||||
begin
|
||||
dc.moveto(array(r[0],p));
|
||||
dc.LineTo(array(r[2],p));
|
||||
p-=sp;
|
||||
|
||||
end
|
||||
end else
|
||||
begin
|
||||
p := sp ;
|
||||
while p<br[2] do
|
||||
begin
|
||||
dc.moveto(array(p,r[1]));
|
||||
dc.LineTo(array(p,r[3]));
|
||||
p+=sp;
|
||||
end
|
||||
end
|
||||
dc.pen.Color := pc;
|
||||
dc.pen.Width := pw;
|
||||
end
|
||||
end
|
||||
function increaseByStep();
|
||||
begin
|
||||
@@ -5989,14 +6019,14 @@ type tcustomprogressbar=class(TCustomControl)
|
||||
@param(stepincrement)(integer)进度栏的步增量%%
|
||||
**}
|
||||
|
||||
private
|
||||
private //属性
|
||||
Fsmooth;
|
||||
Fvertical;
|
||||
Frange;
|
||||
Fposition;
|
||||
Fstep;
|
||||
FbarColor;
|
||||
private
|
||||
private //属性处理函数
|
||||
function setSmooth(n);
|
||||
begin
|
||||
Fsmooth := n;
|
||||
@@ -6388,10 +6418,10 @@ type tcustomipaddr = class(TCustomControl)
|
||||
end
|
||||
property HasPort:bool read FHasPort write SetHasPort;
|
||||
property ipaddr:string read getAddress write setAddress;
|
||||
property onAddrChange:eventhandler read FaddrChange write FaddrChange;
|
||||
property onaddrchanged:eventhandler read FaddrChange write FaddrChange;
|
||||
{**
|
||||
@param(ipaddr)(string)ip地址%%
|
||||
@param(onAddrChange)(function[tIPAddr,tuieventbase])id地址变化回调%%
|
||||
@param(onaddrchanged)(function[tIPAddr,tuieventbase])id地址变化回调%%
|
||||
**}
|
||||
private
|
||||
FEditors;
|
||||
@@ -6443,8 +6473,7 @@ type tcustomipaddr = class(TCustomControl)
|
||||
nv := v?true:false;
|
||||
if FHasPort <>nv then
|
||||
begin
|
||||
FHasPort := nv;
|
||||
|
||||
FHasPort := nv;
|
||||
calcportsize();
|
||||
FPort.Visible := nv;
|
||||
InvalidateRect(nil,false);
|
||||
@@ -6496,9 +6525,7 @@ type tcustomipaddr = class(TCustomControl)
|
||||
Fsynrects[3,0] := ":";
|
||||
Fsynrects[3,1] := rc1;
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
implementation
|
||||
type TtoolbuttonActionLink=class(TControlActionLink)
|
||||
{**
|
||||
|
||||
Reference in New Issue
Block a user