Help GUI Layout toolbox Relative widths
I am writing an interface with GUI Layout toolbox, which has two rows and three columns of block diagrams. I found that the "widths" function can only set the absolute width, and when the display size changes, the layout of block diagrams will also change, which is very ugly, so I would like to ask if you can set the relative proportion of block diagrams? This allows the application to display the same effect on different screen sizes.
Part of my code is as follows:
g = uix.Grid( ‘Parent’, p1, ‘Spacing’, 1 ,’Padding’,1,’BackgroundColor’,[0.8 0.9 0.5]);
g1 = uix.Panel( ‘Parent’,g, ‘Title’, ”, ‘Padding’, 0 ,’FontWeight’,’bold’,’fontsize’,12,’TitlePosition’, ‘centertop’);
g2 = uix.Panel( ‘Parent’,g, ‘Title’, ”, ‘Padding’, 0 ,’FontWeight’,’bold’,’fontsize’,12,’TitlePosition’, ‘centertop’);
obj.ax(5) = axes( ‘Parent’,uicontainer(‘Parent’, g1));%,’Clipping’,’on’,’ActivePositionProperty’, ‘OuterPosition’);
obj.ax(6) = axes( ‘Parent’,uicontainer(‘Parent’, g2));%,’Clipping’,’on’,’ActivePositionProperty’, ‘OuterPosition’);
set( g, ‘Widths’, [-1 400 -2.5], ‘Heights’, [-1 -1] );I am writing an interface with GUI Layout toolbox, which has two rows and three columns of block diagrams. I found that the "widths" function can only set the absolute width, and when the display size changes, the layout of block diagrams will also change, which is very ugly, so I would like to ask if you can set the relative proportion of block diagrams? This allows the application to display the same effect on different screen sizes.
Part of my code is as follows:
g = uix.Grid( ‘Parent’, p1, ‘Spacing’, 1 ,’Padding’,1,’BackgroundColor’,[0.8 0.9 0.5]);
g1 = uix.Panel( ‘Parent’,g, ‘Title’, ”, ‘Padding’, 0 ,’FontWeight’,’bold’,’fontsize’,12,’TitlePosition’, ‘centertop’);
g2 = uix.Panel( ‘Parent’,g, ‘Title’, ”, ‘Padding’, 0 ,’FontWeight’,’bold’,’fontsize’,12,’TitlePosition’, ‘centertop’);
obj.ax(5) = axes( ‘Parent’,uicontainer(‘Parent’, g1));%,’Clipping’,’on’,’ActivePositionProperty’, ‘OuterPosition’);
obj.ax(6) = axes( ‘Parent’,uicontainer(‘Parent’, g2));%,’Clipping’,’on’,’ActivePositionProperty’, ‘OuterPosition’);
set( g, ‘Widths’, [-1 400 -2.5], ‘Heights’, [-1 -1] ); I am writing an interface with GUI Layout toolbox, which has two rows and three columns of block diagrams. I found that the "widths" function can only set the absolute width, and when the display size changes, the layout of block diagrams will also change, which is very ugly, so I would like to ask if you can set the relative proportion of block diagrams? This allows the application to display the same effect on different screen sizes.
Part of my code is as follows:
g = uix.Grid( ‘Parent’, p1, ‘Spacing’, 1 ,’Padding’,1,’BackgroundColor’,[0.8 0.9 0.5]);
g1 = uix.Panel( ‘Parent’,g, ‘Title’, ”, ‘Padding’, 0 ,’FontWeight’,’bold’,’fontsize’,12,’TitlePosition’, ‘centertop’);
g2 = uix.Panel( ‘Parent’,g, ‘Title’, ”, ‘Padding’, 0 ,’FontWeight’,’bold’,’fontsize’,12,’TitlePosition’, ‘centertop’);
obj.ax(5) = axes( ‘Parent’,uicontainer(‘Parent’, g1));%,’Clipping’,’on’,’ActivePositionProperty’, ‘OuterPosition’);
obj.ax(6) = axes( ‘Parent’,uicontainer(‘Parent’, g2));%,’Clipping’,’on’,’ActivePositionProperty’, ‘OuterPosition’);
set( g, ‘Widths’, [-1 400 -2.5], ‘Heights’, [-1 -1] ); gui layout tool, withds MATLAB Answers — New Questions