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

1 回表示 (過去 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 Center および File ExchangeEnvironment and Settings についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by