I am using implay to play some frames i want, the thing is that window size that pops is a bit small,so the user must maximize it by himself, is there any way to control the size of the window that pops up?
Ah 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, this will set them all to the same size)
So you can learn how to find this kind of stuff for yourself, what I did was start with a workspace with no other open windows.
I then used implay(Diff)
to open an implay window.
I then used findall(0)
to find all of the figure/uicontrol handles under 0, which is the root workspace. But there were too many! Most of them are the subcomponents of the implay
window - the menus, buttons, etc. So, I only needed the first component which was created by the root workspace.
To get this, I used findall(0,'Parent',0);
- I could alternatively have used allchild(0);
.
I assigned a variable to this: ImplayHandle=findall(0,'Parent',0);
And looked at its properties:
get(ImplayHandle);
Looking through these, the Tag
seemed to be an identifier of the window, 'spcui_scope_framework'
. I also noticed the Position
property had a similar size to that of a figure window, which was promising.
So, to check, I tried findall(0,'Tag','spcui_scope_framework');
and I was able to see that only a single handle was returned (none of the subcomponents or menu items were also labelled with the same Tag, which was a possibility).
Finally, I closed the open window, then opened a new window using implay(Diff);
again. I used the set
command to try to change the window size:
set(findall(0,'tag','spcui_scope_framework'),'position',[150 150 700 550]);
And saw that the window size had indeed changed, as hoped.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With