is it possible to draw a line in matlab gui panel

Can we draw a line like the one in a figure in MATLAB guide panel to separate the sections?

 채택된 답변

Walter Roberson
Walter Roberson 2018년 5월 7일

0 개 추천

You could use an annotation('line') object, as annotation objects are in figure coordinates. But I would not recommend doing that.
I would recommend that you put the two different areas into different uipanel()

댓글 수: 7

Aash
Aash 2018년 5월 7일
you mean that I should make two uipanels?
Yes, one uipanel for each section. Each uipanel will have a border.
Aash
Aash 2018년 5월 7일
thanks
Aash
Aash 2018년 5월 7일
I have made two panels now but the border is not showing up which seprates them. I have changed the colour of both panel to differentiate them. how to make a border look visible an dark. I am trying changing vlues of borders but nothing change
Set the uipanel HighlightColor to 'k'
Aash
Aash 2018년 5월 8일
what do you mean by k? it opens up colour pallette to select colors from.
'k' is Black.
You can add a CreateFcn callback for the uipanel similar to
function uipanel1_CreateFcn(varargin)
set(varargin{1}, 'HighlightColor', 'k')
If you do then you do not need to work with the color chooser: the color will be set at the time the figure is opened. (You would need to close the GUI to see the result.)

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Environment and Settings에 대해 자세히 알아보기

질문:

2018년 5월 7일

댓글:

2018년 5월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by