forked from liujianjun/tslediter
界面库
优化细节
This commit is contained in:
+29
-10
@@ -1554,7 +1554,7 @@ type tbtn = class(tcustombtn)
|
||||
function publishs();override;
|
||||
begin
|
||||
return array("name","action","left","top","width","height",
|
||||
"align","anchors","caption","font","enabled","visible","bkbitmap","color","tabstop","onclick","onmousemove");
|
||||
"align","anchors","caption","font","enabled","visible","bkbitmap","color","tabstop","onclick","onmousemove","onsetfocus","onkillfocus");
|
||||
end
|
||||
|
||||
end
|
||||
@@ -2994,7 +2994,7 @@ type TPairSplitterSide=class(TCustomControl)
|
||||
return array("name","border","caption","color","popupmenu","bkbitmap","wsdlgmodalframe","onsize");
|
||||
end
|
||||
end
|
||||
type TPairSplitter=class(TWinControl) //
|
||||
type TPairSplitter=class(tcustomcontrol) //
|
||||
{**
|
||||
@explan(说明)分割控件 %%
|
||||
**}
|
||||
@@ -3031,7 +3031,7 @@ type TPairSplitter=class(TWinControl) //
|
||||
end
|
||||
Function SetSplitterType(v);
|
||||
begin
|
||||
if v in array(pstHorizontal,pstVertical)and v <> FSplitterType then
|
||||
if (v in array(pstHorizontal,pstVertical)) and v <> FSplitterType then
|
||||
begin
|
||||
FSplitterType := v;
|
||||
if FSplitterType=pstVertical then cursor := OCR_SIZENS else cursor := OCR_SIZEWE;
|
||||
@@ -3078,10 +3078,7 @@ type TPairSplitter=class(TWinControl) //
|
||||
FSplitterType := pstHorizontal;
|
||||
cursor := OCR_SIZEWE;
|
||||
FWill_Drag := true;
|
||||
end
|
||||
function CreateParams(p);override;
|
||||
begin
|
||||
inherited;
|
||||
Color := _wapi.GetSysColor(COLOR_MENUBAR);
|
||||
end
|
||||
function AddSide(ASide);
|
||||
begin
|
||||
@@ -3110,12 +3107,32 @@ type TPairSplitter=class(TWinControl) //
|
||||
begin
|
||||
_wapi.ImageList_DragLeave(self.Handle);
|
||||
_wapi.ImageList_EndDrag();
|
||||
r := ClientRect;
|
||||
if FSplitterType=pstHorizontal then
|
||||
begin
|
||||
FPosition := e.xpos;
|
||||
x := e.xpos ;
|
||||
if x<(r[0]+2) then
|
||||
begin
|
||||
x := r[0]+5;
|
||||
end else
|
||||
if x>(r[2]-2) then
|
||||
begin
|
||||
x := r[2]-5;
|
||||
end
|
||||
FPosition := x;
|
||||
end else
|
||||
begin
|
||||
FPosition := e.ypos;
|
||||
x := e.ypos;
|
||||
if x<(r[1]+2) then
|
||||
begin
|
||||
x := r[1]+5;
|
||||
end else
|
||||
if x>(r[3]-2) then
|
||||
begin
|
||||
x := r[3]-5;
|
||||
end
|
||||
|
||||
FPosition :=x;
|
||||
end
|
||||
EnabledChild(true);
|
||||
FWill_Drag := true;
|
||||
@@ -3225,6 +3242,7 @@ type TPairSplitter=class(TWinControl) //
|
||||
end
|
||||
function WMERASEBKGND(o,e):WM_ERASEBKGND;override;
|
||||
begin
|
||||
return inherited;
|
||||
dc := e.wparam;
|
||||
if dc then
|
||||
begin
|
||||
@@ -3265,12 +3283,13 @@ type TPairSplitter=class(TWinControl) //
|
||||
e.Result := 1;
|
||||
end
|
||||
end
|
||||
|
||||
property Position:integer read GetPosition write SetPosition;
|
||||
property SplitterType:SplitterType read FSplitterType write SetSplitterType;
|
||||
function publishs();override;
|
||||
begin
|
||||
return array("name","left","top","width","height",
|
||||
"align","anchors","border","caption","enabled","visible","SplitterType","position",
|
||||
"align","anchors","border","caption","enabled","visible","splittertype","position",
|
||||
"wsdlgmodalframe","wscaption","wspopup","wssizebox","wssysmenu");
|
||||
end
|
||||
{**
|
||||
|
||||
Reference in New Issue
Block a user