y优化
This commit is contained in:
tslediter 2023-12-21 16:12:54 +08:00
parent 612a2046af
commit 97570dea24
5 changed files with 488 additions and 181 deletions

View File

@ -1080,11 +1080,15 @@ type TProjectView = class(TVCForm) //
global g_orig_lib_path;
sdir := array(p);
idx := 1;
hdirs := array(p:true);
if ifstring(g_orig_lib_path) then
begin
for i,v in str2array(g_orig_lib_path,";") do
begin
tm := trim(v);
if hdirs[tm] then continue;
hdirs[tm] := true;
if tm then
begin
sdir[idx++] := tm;

View File

@ -2052,12 +2052,27 @@ function delexttypeclasscomp(n);
begin
class(TDComponent).unregestorclassitemsext(n);
end
function Getfuncextdir();
begin
tsl := SysExecName();
ios := ioFileseparator();
for i := length(tsl)-1 downto 2 do
begin
vi := tsl[i];
if vi=ios then
begin
tsl[i+1:length(tsl)]:= "funcext";
break;
end
end
return tsl;
end
function staticInit();
begin
global g_orig_lib_path;
np := getdesignerpath()+"dcmps"+ioFileseparator();
CreateDirWithFileName(np+"1.txt");
g_orig_lib_path := tsl_getlibpath_();
g_orig_lib_path := tsl_getlibpath_()+";"+Getfuncextdir();
tsl_setlibpath_( np+";"+g_orig_lib_path);
ini := static getdesginerini();
//class(TDSocketServer),class(TDSocketClient),

View File

@ -1543,7 +1543,7 @@ type TGridCellNaturalEdit = class(TGridPropertyRender,TPropertyNatural)
FEdit.parent := FGrid;
FEdit.OnChanged := thisfunction(Ched);
end
FEdit.SetBoundsRect(FGrid.clienttoscreen(rec[0],rec[1]) union FGrid.clienttoscreen(rec[2],rec[3]));
FEdit.SetBoundsRect(rec);//FEdit.SetBoundsRect(FGrid.clienttoscreen(rec[0],rec[1]) union FGrid.clienttoscreen(rec[2],rec[3]));
FEdit.text := numbertotext(d["value"]);
FEdit.parent := grid;
FEdit.SetFocus();
@ -1683,12 +1683,15 @@ type TPopEditCtrl = class(TCustomControl)
function create(AOwner);override;
begin
inherited;
WsPopUp := true;
//WsPopUp := true;
WsDlgModalFrame := false;
FEdit := new tedit(self);
width := FEdit.Width+2;
height := FEdit.Height +2;
FEdit.align := alClient;
FEdit.onkillfocus := function(o,e)begin
self.visible := false;
end
FEdit.parent := self;
FEdit.OnKeyPress := function(o,e)begin
CallDataFunction(FOnKeyPress,self,e);
@ -3257,6 +3260,7 @@ type TMultiSelectCell = class(TGridCellEditWithButton)
FPanel.wspopup := true;
FPanel.SetListData(SelPalRange());
FPanel.Onokclick := thisfunction(SelChanged);
FPanel.parent := Owner;
end
end
function SelPalRange();virtual;
@ -3285,7 +3289,7 @@ type TMultiSelectCell = class(TGridCellEditWithButton)
FCellv := array();
GetSelPanel();
rec := GetPopRectByHeight(160);
rec[3] := rec[1]+160;
rec[3] := rec[1]+160;
FPanel.SetBoundsRect(rec);
FPanel.SetSelectData(FListSel);
FPanel.Show();
@ -3314,6 +3318,7 @@ type TOneSelectCell = class(TGridCellEditWithButton)
FPanel.wspopup := true;
FPanel.SetList(SelPalRange());
FPanel.OnSelChanged := thisfunction(SelChanged);
FPanel.parent := Owner;
end
end
function SelPalRange();virtual;

View File

@ -4500,7 +4500,9 @@ type tapplicationwindow=class(TWinControl)
end
function InitializeWnd();override;
begin
global g_applicaton_wnd_handle;
inherited;
g_applicaton_wnd_handle := handle;;
{echo self.Handle;
SysMeu := _wapi.GetSystemMenu(self.Handle,False);
echo "\r\nsysmenu",sysmenu;

File diff suppressed because it is too large Load Diff