Effacer les filtres
Effacer les filtres

Two simple questions about listdlg

35 vues (au cours des 30 derniers jours)
Erik J
Erik J le 16 Déc 2020
Modifié(e) : dpb le 3 Nov 2022
1) Is it possible to change the font size in listdlg?
2) Is it possible to somehow make it so multiple elements can be selected WITHOUT needing to hold command/Ctrl key?
Thank you.
  2 commentaires
dpb
dpb le 2 Nov 2022
I'll add a third "simple" Q? regarding listdlg (and applies to the others in the kindred family as well)...
  1. ...
  2. ...
  3. Why would one let the user MINIMIZE the modal window? It goes away and the user is now blind to what is needed to be done without searching for where it went...if they even have sufficient prescience to realize that's what just happened to them.
dpb
dpb le 2 Nov 2022
In searching for the above, I also stumbled over <appdesigner window in background after uigetfile> raised in 2016 but still an issue. It also happens with all the other dialogs...I'd been frustrated about that since began this as a tool for myself some two+ years ago, but just lived with it. For packaging for the staff folks to use, it's an almost impossible nuisance to deal with. Why on earth don't these return focus to the calling window inately instead of off somewhere who knows where???
At least the figure(app.UIFigure) thing seems to solve my issues; I'm not sure about the problem of the dialog itself being behind everything else.

Connectez-vous pour commenter.

Réponse acceptée

Adam Danz
Adam Danz le 17 Déc 2020
Modifié(e) : Adam Danz le 17 Déc 2020
  1. No. listdlg does not have a fontsize property and is a modal dialog which suspends execution until a selection is made so there's no way to manipulate the figure after its created. I tried using latex to set the fontsize but there is also no way to set the text interpreter.
  2. It depends. When the SelectionMode is set to multiple you can hold the mouse button down and drag over multiple items, you can use the command/ctrl key to select noncontiguous items, you can use the "select all" button that appears, or you can select single items. But you cannot select multiple noncontiguous items without holding down the command/ctrl key.
An alternative that offers both of these features is a radio button group. It wouldn't be too difficult to organize the list into a bunch of radio button options.
  2 commentaires
Erik J
Erik J le 17 Déc 2020
Great. This is perfect. Thank you! I may try the radio button approach.
dpb
dpb le 2 Nov 2022
Modifié(e) : dpb le 3 Nov 2022
"No. listdlg does not have a fontsize property and is a modal dialog which suspends execution until a selection is made so there's no way to manipulate the figure after its created. "
Yeah, I just got to this point in trying to clean up a UI for an app to make it look somewhat better -- why are none of these obvious needs met in any of the UI toolset?
Why doesn't listdlg just automagically fit itself to the provided data list instead having an arbitrary one size fits all window size (in pixels, no less! for heaven's sake)? There's no way to easily figure out the pixel size associated with the string length/height; about the best in a short time I've come up with is to just find an arbitrary scaling factor that seems to work at least reasonably well and go with it.
Doesn't seem like it should be hard for the system to deal with this but much more so for the end user. It comes around to a similar discussion area we've had and continued for some time; it almost always seems to come down to spending an inordinate amount of time on the appearance details to get something that looks nice with respect to the graphics. I don't have enough experience building GUIs (these are, in fact, my first attempts at packaging something for somebody else in 30+ yr of MATLAB use and in 40+ year consulting all the product UI stuff was done by another group; "all" I had to deal with was the hardware interfaces and converting a returned gamma spec to a calibrated product percentage be that coal ash, elemental sulfur, ... ). They may have had to go through the same exercise and I was just blissfully unaware; and maybe the commercial app folks have to go thru the agony as well...

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by