How do I make EditText HorizontalAlignment to the right work?

조회 수: 5 (최근 30일)
Gavin
Gavin 2025년 2월 5일
편집: Cris LaPierre 2025년 2월 9일
Why can't I ask my question: How do I make EditText.HorizontalAlignment = 'right' work?
Description is blocked from being used with no explanation when there is ??? punctuation in the question?!
Anyway using App Designer ...
I have an edit field (text) where I clicked the HorizontalAlignment right Icon which put HorizontalAlignment = 'right'; into the constructor as it should. The reason is that it's a path and not a lot of room on the screen. I'm happy to skip the C:\USER\UserName\Documents\... part of the path in the display. What's important to see is the end of the line with the final subdirectory. BUT when the text line is longer than the available space it just left aligns anyway so I can be sure to see C:\
Short of keeping a separate string for display that has the beginning snipped off how can I get a full path name (or any text) to properly right align?

채택된 답변

Cris LaPierre
Cris LaPierre 2025년 2월 5일
편집: Cris LaPierre 2025년 2월 9일
It looks like an edit field does not overflow to the left. I'd suggest reporting this as an enhancement here: https://www.mathworks.com/support/contact_us.html

추가 답변 (0개)

카테고리

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

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by