1、減少執(zhí)行文件體積及兼顧debug
lazarus開戶debug功能時,生成的執(zhí)行文件非常大,如果不開啟debug時體積比較小巧,但造成無法斷點(diǎn)調(diào)試的情況,有沒有兼顧體積和調(diào)試的方法呢?
在project--project options--compiler options--debugging--勾上use external debug symbols file(-Xg),重新編譯應(yīng)用,生成的文件體積基本和取消debug時差不多大小,又同時兼顧體積和實(shí)現(xiàn)調(diào)試。

2、開啟代碼結(jié)構(gòu)匹配連線功能
lazarus默認(rèn)沒開啟代碼結(jié)構(gòu)匹配連線功能,開啟步驟:
tools--Options--Editor--Display--Makup and Matches--Outline(global)

開啟前:

開啟后的:

3、代碼補(bǔ)全:


5、模板編輯:

將test修改為test1

8、回車焦點(diǎn)轉(zhuǎn)一下控件(2022.04.20修正):
原來的方法是從網(wǎng)上搜到的,這個方法在界面簡單時才起作用,作為通用方法應(yīng)將SelectNext(ActiveContorl,true,true)改為SelectNext(TWinControl(Sender),true,true),經(jīng)測試發(fā)現(xiàn)TDateEdit日期控件不起作用。
procedure TForm_luru.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if (Key = VK_RETURN) or (Key = VK_Down) then begin SelectNext(TWinControl(Sender), true, true);//2022.04.20修正 end else if (Key = VK_Up) then begin SelectNext(TWinControl(Sender), false, true);//2022.04.20修正 end; end;
9.代碼自動補(bǔ)全

浙公網(wǎng)安備 33010602011771號