How can I align strings with the same length in a uicontrol object in MATLAB?

1 view (last 30 days)
I am trying to align the strings in my listbox. I have ensured that they all have the same length, but they are not aligned.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
Strings with the same length can be aligned in a uicontrol object in MATLAB by setting the "FontName" property to "FixedWidth". This can be done either by using the INSPECT function to open the Property Inspector or by uding the SET function as shown below:
set(uicontrol_handle, 'FontName', 'FixedWidth')
where "uicontrol_handle" is the handle to the uicontrol

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!