Code: Select all
local F = far.Flags
Event {
id = "341E1B56-156A-4FB7-8BD9-C1AD7B578A17";
group = "DialogEvent";
description = "Исправление диалогов для раскраски";
condition = function(Event, Param)
return Event == F.DE_DLGPROCINIT and Param.Msg == F.DN_INITDIALOG and Param.hDlg
end;
action = function(Event, Param)
local hDlg = Param.hDlg
for i=1,math.huge do
local item = hDlg:send(F.DM_GETDLGITEM, i)
if not item then break end
local i1 = item[1]
if (i1 == F.DI_EDIT or i1 == F.DI_COMBOBOX or i1 == F.DI_FIXEDIT or i1 == F.DI_PSWEDIT or i1 == F.DI_CHECKBOX or i1 == F.DI_RADIOBUTTON) and
item[5] > 0 and item[5] > item[3] then
hDlg:send(F.DM_SETITEMPOSITION, i, {Left=item[2]; Top=item[3]; Right=item[4]; Bottom=item[3]})
end
end
end;
}