登录论坛

查看完整版本 : [求助]gui的position问题


automation
2008-05-15, 20:23
function model_open(handles)
% Make sure the diagram is still open
if isempty(find_system('Name','f14')),
open_system('f14'); open_system('f14/Controller')

set_param('f14/Controller/Gain','Position',[275 14 340 56])

figure(handles.F14ControllerEditor)
% Put values of Kf and Ki from the GUI into the Block dialogs
set_param('f14/Controller/Gain','Gain',...
get(handles.KfCurrentValue,'String'))
set_param('f14/Controller/Proportional plus integral compensator',...
'Numerator',...
get(handles.KiCurrentValue,'String'))
end
%endfunction model_open

如上的红字中,‘position’的位置是怎么确定的,要怎么知道是[275 14 340 56],用什么方法确定的?

tpwxhfh
2008-05-16, 17:17
说一个比较笨的方法吧,我的显示器分辨率是1024*768的,我就将显示器窗口大体按照这个分了几份,然后粗略的定了弹出窗口的位置大小