Azzera filtri
Azzera filtri

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

2 visualizzazioni (ultimi 30 giorni)
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 ?

Risposte (1)

Image Analyst
Image Analyst il 30 Mar 2023
Try creating a scroll panel. See attached zoom demo.
  2 Commenti
francois heslot
francois heslot il 4 Apr 2023
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 il 4 Apr 2023
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.

Accedi per commentare.

Categorie

Scopri di più su Environment and Settings in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by