필터 지우기
필터 지우기

menu position and size

조회 수: 31 (최근 30일)
Artur M. G. Lourenço
Artur M. G. Lourenço 2011년 11월 4일
편집: per isakson 2014년 10월 24일
how to make set position and zise of a menu
e.g.:
choice = menu('Choose a color','Red','Blue','Green')
i want make this:
set('position',[ 100 100 100 100]) set('size', etc)
this commands are ivalids for function 'menu'
thanks adv

채택된 답변

Walter Roberson
Walter Roberson 2011년 11월 4일
The code for menu() determines the position and size automatically, taking in to account the size required in order to fit the text and the buttons.
The only thing you can change is
get(0,'DefaultUicontrolFontsize')
ans =
10
to provide a larger font size (which would result in the text being larger, thus affecting the window size.)
If you need finer control, then menu() is not the appropriate tool for the task. menu() is designed for simplicity of user interface.
  댓글 수: 5
Alexei
Alexei 2014년 10월 24일
Is it also impossible to put special characters into the menu choices? For instance I typed '1\omega' as one of the choices, and it just displayed 1\omega instead of what I wanted -- 1 followed by the Greek character. Or am I doing something wrong? This syntax works when inputting a label on a figure, for instance.
per isakson
per isakson 2014년 10월 24일
편집: per isakson 2014년 10월 24일
See Customizing menu items part 1 and part 2 at Undocumented Matlab

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Labels and Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by