更新界面库
This commit is contained in:
@@ -197,6 +197,7 @@ end
|
||||
end
|
||||
type TProjectView = class(TVCForm) //工程文件浏览
|
||||
private
|
||||
fseltimer;
|
||||
FAddtoolbtn;
|
||||
FTreePopUpMenu;
|
||||
//**************目录树筛选功能***********************************
|
||||
@@ -229,7 +230,8 @@ type TProjectView = class(TVCForm) //
|
||||
public
|
||||
function FilterKillFocus(o,e);
|
||||
begin
|
||||
if FFilterList.visible then FFilterList.visible := false;
|
||||
fseltimer.timeout(thisfunction(seltimerdo),500);
|
||||
//if FFilterList.visible then FFilterList.visible := false;
|
||||
end
|
||||
function FilterChanged(o,e);
|
||||
begin
|
||||
@@ -251,21 +253,38 @@ type TProjectView = class(TVCForm) //
|
||||
end
|
||||
FFilterList.visible := false;
|
||||
end
|
||||
function filterselect();
|
||||
begin
|
||||
if FFilterList.visible then
|
||||
begin
|
||||
FFilterList.visible := false;
|
||||
FFilter.text := "";
|
||||
idx := FFilterList.getCurrentSelection();
|
||||
if idx >= 0 then
|
||||
begin
|
||||
FTree.SetSel(FFilterNodes[idx]);
|
||||
end
|
||||
end
|
||||
end
|
||||
function Filterclksel();
|
||||
begin
|
||||
if FFilterList.visible then
|
||||
begin
|
||||
FFilterList.visible := false;
|
||||
FFilter.text := "";
|
||||
idx := FFilterList.getCurrentSelection();
|
||||
if idx >= 0 then
|
||||
begin
|
||||
FTree.SetSel(FFilterNodes[idx]);
|
||||
end
|
||||
end
|
||||
end
|
||||
function FilterKeyDown(o,e);
|
||||
begin
|
||||
cc := e.CharCode;
|
||||
if cc=13 then
|
||||
begin
|
||||
if FFilterList.visible then
|
||||
begin
|
||||
FFilterList.visible := false;
|
||||
o.text := "";
|
||||
idx := FFilterList.getCurrentSelection();
|
||||
if idx >= 0 then
|
||||
begin
|
||||
FTree.SetSel(FFilterNodes[idx]);
|
||||
end
|
||||
end
|
||||
filterselect();
|
||||
end else
|
||||
if cc =VK_DOWN then
|
||||
begin
|
||||
@@ -300,11 +319,17 @@ type TProjectView = class(TVCForm) //
|
||||
end
|
||||
else e.skip := true;
|
||||
end
|
||||
function seltimerdo(o,e);
|
||||
begin
|
||||
if FFilterList.visible then FFilterList.visible := false;
|
||||
end
|
||||
//**************目录树筛选功能***********************************
|
||||
//////////////////构造函数//////////////////////////////
|
||||
function Create(AOwner);override;
|
||||
begin
|
||||
inherited;
|
||||
fseltimer := new TTimer(self);
|
||||
//
|
||||
minmaxbox := false;
|
||||
FDesigner := AOwner;
|
||||
//visible := false;
|
||||
@@ -397,6 +422,7 @@ type TProjectView = class(TVCForm) //
|
||||
FFilter.OnChange := thisfunction(FilterChanged);
|
||||
FFilter.onSetFocus := thisfunction(FilterChanged);
|
||||
FFilter.onKillFocus := thisfunction(FilterKillFocus);
|
||||
FFilterList.onmouseup := thisfunction(Filterclksel);
|
||||
//************************************************************
|
||||
FTree := new TFileTree(self);
|
||||
FTree.Align := alClient;
|
||||
|
||||
@@ -499,7 +499,9 @@ type TPage=class(TCustomControl) //
|
||||
FLines := 1;
|
||||
if not FPageitems then return ;
|
||||
li := 0;
|
||||
cw := Font.Width;
|
||||
ft := font;
|
||||
if ft then cw := ft.Width;
|
||||
else cw := 10;
|
||||
r := class(TCustomControl).ClientRect;
|
||||
x := 0;
|
||||
xct := 0;
|
||||
|
||||
@@ -1494,6 +1494,15 @@ type TGraphicLabelWindow = class(TDVirutalWindow)
|
||||
//al := BindComp.TextAlign;
|
||||
//BindComp.CanvasDrawAlignText(self.canvas,self.ClientRect,self.caption,al);
|
||||
end
|
||||
function GetPreferredSize(w,h);override;
|
||||
begin
|
||||
bd :=BindComp;
|
||||
if not bd then return ;
|
||||
c := bd.Caption;
|
||||
ft := Font;
|
||||
w := length(c)*ft.width+2;
|
||||
h := ft.height+2;
|
||||
end
|
||||
function SetPublish(n,v,pp);override;
|
||||
begin
|
||||
r := inherited;
|
||||
@@ -1508,7 +1517,7 @@ type TGraphicLabelWindow = class(TDVirutalWindow)
|
||||
BindComp := new tlabel(self);
|
||||
width := BindComp.width;
|
||||
height := BindComp.Height;
|
||||
WindowFileds := array("left","top","width","height","color","parentcolor","font","parentfont","border","visible","align","anchors");
|
||||
WindowFileds := array("left","top","width","height","autosize","color","parentcolor","font","parentfont","border","visible","align","anchors");
|
||||
end
|
||||
function DesigningSizer();override;
|
||||
begin
|
||||
@@ -1527,6 +1536,10 @@ type TGraphicbevelWindow = class(TDVirutalWindow)
|
||||
bd.canvas.Handle := canvas.Handle;
|
||||
bd.paint();
|
||||
end
|
||||
function FontChanged(o);override;
|
||||
begin
|
||||
if autosize then AdjustSize();
|
||||
end
|
||||
function SetPublish(n,v,pp);override;
|
||||
begin
|
||||
r := inherited;
|
||||
@@ -3866,6 +3879,36 @@ FCE218FD50E80000000049454E44AE42608200";
|
||||
inherited;
|
||||
end
|
||||
end
|
||||
type TDtabctl = class(TDComponent)
|
||||
function HitTip();override;
|
||||
begin
|
||||
return inherited;
|
||||
end
|
||||
function bitmapinfo();override;
|
||||
begin
|
||||
return "900200000000000000020000000200000001000000900100003C0000000000000
|
||||
004000000040000000400000008000000030000000B0000004901000074797065
|
||||
64617461696D6789504E470D0A1A0A0000000D494844520000003000000030080
|
||||
60000005702F987000000017352474200AECE1CE90000000467414D410000B18F
|
||||
0BFC6105000000097048597300000EC300000EC301C76FA864000000DE4944415
|
||||
46843ED974B0A84301005E782AE3D8A37F602FEF193C1452443C274DA9179ADBC
|
||||
82DA3D2585A0F872378701681880E639015555B9A22854EED7A039025207CC114
|
||||
D14904B187195679EA8A9805D2D3F07D475FD55ED4ECBF302B66DCBD2EF538709
|
||||
D5EEB44401EBBA66E9F7A9C3846A775AA2806559B2F47B84E1DB2A0A98E739CBB
|
||||
22C3F6EFA6F3D51C0344DA61503C67134AD18300C8369C580BEEF4D2B06745D67
|
||||
5A31A06D5BD38A014DD398560CB88B9E23E0CC1F19CAE497F8AE30000D03D0300
|
||||
00D03D030000D03D030000D03D030000D03D030008B736F04D94E768181B63200
|
||||
00000049454E44AE426082";
|
||||
end
|
||||
function WndClass();override;
|
||||
begin
|
||||
return Class(ttabcontrol);
|
||||
end
|
||||
function Create(AOwner);override;
|
||||
begin
|
||||
inherited;
|
||||
end
|
||||
end
|
||||
function registercomponenttodesigner(cls);
|
||||
begin
|
||||
{**
|
||||
@@ -3881,7 +3924,7 @@ begin
|
||||
class(TDForm),class(TDPanelForm),
|
||||
class(TDPanel),class(TDGroupBox),
|
||||
class(TDPairSplitter),class(TDPairSplitterSide),
|
||||
class(TDPage),class(TDTabSheet),
|
||||
class(TDPage),class(TDTabSheet),class(TDtabctl),
|
||||
class(TDTimer),
|
||||
class(tdworkerctl),
|
||||
class(TDImageList),
|
||||
|
||||
@@ -1960,10 +1960,7 @@ type TGridCellhotkeyEdit = class(TGridPropertyRender,TPropertyHotkey)
|
||||
end;
|
||||
|
||||
end
|
||||
type TGridCellBoolEdit = class(TGridPropertyRender,TPropertyBool)
|
||||
{**
|
||||
@explan(说明) boolcell编辑
|
||||
**}
|
||||
type tgridCellBoolbaseEdit = class(TGridPropertyRender)
|
||||
private
|
||||
FRbuttonWidth;
|
||||
function DrawButton(dc,srca,v);
|
||||
@@ -1992,7 +1989,8 @@ type TGridCellBoolEdit = class(TGridPropertyRender,TPropertyBool)
|
||||
|
||||
rec := grid.getSubItemRect(i,j);
|
||||
if pt[0]<(rec[2]-FRbuttonWidth) then exit;
|
||||
if d["class"]="bool" then
|
||||
dc := d["class"];
|
||||
if dc="bool" or dc="lazybool" then
|
||||
begin
|
||||
grid.CellChanged(i,j,"value",not(d["value"]));
|
||||
end
|
||||
@@ -2013,8 +2011,24 @@ type TGridCellBoolEdit = class(TGridPropertyRender,TPropertyBool)
|
||||
end
|
||||
DrawButton(dc,src,dv);
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
type TGridCellBoolEdit = class(tgridCellBoolbaseEdit,TPropertyBool)
|
||||
{**
|
||||
@explan(说明) boolcell编辑
|
||||
**}
|
||||
function create(AOwner);override;
|
||||
begin
|
||||
inherited;
|
||||
end
|
||||
end
|
||||
type TGridCelllazyBoolEdit = class(tgridCellBoolbaseEdit,TPropertylazyBool)
|
||||
{**
|
||||
@explan(说明) lazybool cell编辑
|
||||
**}
|
||||
function create(AOwner);override;
|
||||
begin
|
||||
inherited;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -4738,6 +4752,7 @@ function staticinit();
|
||||
begin
|
||||
psi := (array(
|
||||
class(TGridCellBoolEdit),
|
||||
class(TGridCelllazyBoolEdit),
|
||||
class(TGridCellColorEdit),
|
||||
class(TGridCellDirectoryEdit),
|
||||
class(TGridCellFileNameEdit),
|
||||
|
||||
Reference in New Issue
Block a user