フィルターのクリア

Change the size and position on the screen of interative menu

19 ビュー (過去 30 日間)
Madalena Francisco
Madalena Francisco 2023 年 1 月 6 日
コメント済み: Madalena Francisco 2023 年 1 月 11 日
I want so change the size of a interative menu and change the position on the screen, on Matlab 2022?
Example:
choice=menu('1','2')
When I run this, the size menu it´s too small, and appears always on the same position, I want to be able to increase the size and put the menu wherever I want.
Thanks for the help
  7 件のコメント
Adam Danz
Adam Danz 2023 年 1 月 10 日
I see, you're using the old menu function. You could use questdlg as Voss mentioned or uiconfirm. You won't be able to specify the location or size of these dialogs but their default positions will be a lot better than menu.
If you want to specify the position and size you'll need to create a custom dialog or use a dialog that isn't modal.
Madalena Francisco
Madalena Francisco 2023 年 1 月 11 日
Thank u both! I will use questdlg, it´s a good function to use! Thanks thanks

サインインしてコメントする。

採用された回答

Voss
Voss 2023 年 1 月 8 日
menu does not support setting the position of the window. Here is a modified version, my_menu (attached), which does. (It's based on the R2016b version of menu.)
Call my_menu the same way you call menu, or append optional 'Position',pos arguments at the end to set the position. pos is a 1-by-4 vector of the position ([x y width height]) in pixels.
Examples:
my_menu('Choose',1,2,3);
my_menu('Choose',1,2,3,'Position',[500 500 300 400]);
my_menu('Choose',{1,2,3});
my_menu('Choose',{1,2,3},'Position',[500 500 300 400]);
  1 件のコメント
Madalena Francisco
Madalena Francisco 2023 年 1 月 9 日
編集済み: Madalena Francisco 2023 年 1 月 9 日
Thank u for your answer!! It may help to change the position on that format!
But in the format that i´m using i want to be able to change the size of menu too, it´s that possible?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDialog Boxes についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by