I've reviewed the script and now only adjust the height of the Plugin window if its natural height is greater than the screen.
This mainly involves rewriting the
function SetMinimumSize(dlg) at about line 486 as shown below.
Within
function MakeExpander(...) at about line 516 insert:
e.action = function() SetMinimumSize(dlgmain) end
After
dlgmain.close_cb = function() ...
end at about line 1418 insert:
dlgmain.resize_cb = function(self) SetMinimumSize(self) end
Those ensure the Plugin window is reviewed whenever an expander is changed or the window is resized.
Code: Select all
function SetMinimumSize(dlg)
local _,_, height = stringx.partition(iup.GetGlobal("SCREENSIZE"),"x")
local old_wide, _, old_high = stringx.partition(dlg.rastersize,"x")
dlg.minsize = iup.NULL
dlg.size = iup.NULL
iup.Refresh(dlg)
local new_size = dlg.rastersize
local new_wide, _, new_high = stringx.partition(new_size,"x")
if height < new_high then
new_high = tostring(tonumber(height) + 10)
dlg.rastersize = old_wide.."x"..new_high
dlg.minsize = new_wide.."x"..new_high
else
dlg.rastersize = old_wide.."x"..old_high
dlg.minsize = new_size
end
iup.Refresh(dlg)
end
So on large screens the Plugin window should never change at all, except that its minimum size is reset.
On small screens the Plugin window is reduced to the screen height, with position and width unaltered.
If necessary, closing some expanders should always reveal the
Clear,
Create Facts &
Exit buttons.
I suspect the reduced font size for small screens can be increased from
8 point to
9 or
10 point and still be OK.
If the above changes still cause your Plugin window to be repositioned, resized, or undocked, then I admit defeat.
Something about your system configuration is different from mine, so very difficult to resolve.