Matlab - implay default size window

I use implay to play some frames that I want, the fact is that the size of the window that appears is a bit small, so the user must maximize it himself, is there any way to control the size of the window that appears?

+4
source share
3 answers

And here we go:

implay(Diff); set(findall(0,'tag','spcui_scope_framework'),'position',[150 150 700 550]); 

Works in 2012b. (Note: if you have more than one implay window open, they will all be the same)

So, you can find out how to find this material for yourself, what I did started with a workspace without any other open windows.

Then I used implay(Diff) to open the implay window.

Then I used findall(0) to find all the drawing handles / uicontrol under 0, which is the root workspace. But there were too many of them! Most of them are subcomponents of the implay window - menus, buttons, etc. Thus, I only need the first component created by the root working environment.

To get this, I used findall(0,'Parent',0); - I could use allchild(0); .

I assigned a variable to this: ImplayHandle=findall(0,'Parent',0);

And looked at its properties:

get(ImplayHandle);

Looking through them, Tag seemed to be the window identifier, 'spcui_scope_framework' . I also noticed that the Position property is the same size as the shape window, which was promising.

So, to check, I tried findall(0,'Tag','spcui_scope_framework'); , and I managed to see that only one descriptor was returned (none of the subcomponents or menu items were also tagged with the same tag as was possible).

Finally, I closed the open window, and then opened the new window again using implay(Diff); . I used the set command to try resizing the window:

set(findall(0,'tag','spcui_scope_framework'),'position',[150 150 700 550]);

And I saw that the size of the window really changed, as you might hope.

+7
source

You can control the size of the shape using the 'Position' property.
This property expects a 4-element vector in the format [fromX fromY width height] , therefore, by changing the width and height , you can control the size of the figure.

for instance

 figure( 'Position', [150 150 700 550] ) 

Opens a new drawing with a width of 700 pixels and a height of 550 pixels.

0
source
 handle = implay(movie); handle.Parent.Position = [100 100 700 550]; 

Also works if you want to set the window size.

0
source

Source: https://habr.com/ru/post/1490227/


All Articles