필터 지우기
필터 지우기

How To: create bare-bone tiny window attached to figure, no GUI

조회 수: 2 (최근 30일)
francois heslot
francois heslot 2023년 3월 30일
댓글: Rik 2023년 4월 4일
Hello,
without using a GUI, I would like to be able to attach to an existing figure window,
a tiny 'bare-bone' window, for displaying some text info (attached to the figure, not its axes)
The window should not move if the X-limits or the Y limits of the displayed data are changed.
I would like the window to be 'bare-bone', i.e. appearance strictly limited to a line contour
defining an interior. The interior should be able to hold some text (defined programmatically).
The size of the window should be defined programmatically, along with its initial position.
I am looking forward to get an aspect akin to a 'datatip' info window, except it is not pointing to data.
And last, this tiny window should be user-repositionable in X-Y (with no change in size),
anywhere on the figure.
any idea of how to achieve that ?

답변 (1개)

Image Analyst
Image Analyst 2023년 3월 30일
Try creating a scroll panel. See attached zoom demo.
  댓글 수: 2
francois heslot
francois heslot 2023년 4월 4일
Well,
for the help request :
"bare-bone tiny window attached to figure, no GUI"
the "scroll panel" appears to be a akin to using sledge hammer to squash a fly.
UI is involved, sliders are added to the window, etc, etc...
No "bare-bone and without UI" solution for such a simple task ??
(I bluntly tried deleting those sliders, and "scroll panel" is not happy with that...:
Error using matlab.ui.control.UIControl/set Invalid or deleted object.
Error in imscrollpanel/updateViewport (line 1126) set(hSliderVer, 'units', 'pixels');
Error in imscrollpanel/resizeView (line 1083) updateViewport() % Need to do this to get positions correctly
Error while evaluating Panel SizeChangedFcn.)
Rik
Rik 2023년 4월 4일
Your requirements seem to be conflicting. You don't want a GUI, but you want a second figure?
It sounds to me like you did not remove all callbacks related to the scrollpanel.
Note that this communication style (bold text and short sentences) may be perceived as rude. Tone is of course very difficult to communicate through text, especially if you don't know the other person and/or share a similar linguistic and cultural background.

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

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by