Azzera filtri
Azzera filtri

GUIDE: Is it possible to write part of a string in a uicontrol objetc in bold?

10 visualizzazioni (ultimi 30 giorni)
Hi there! I was wondering if it's possible in a GUI to have, for example, a pushbutton or a static text with a string that has some of its words in bold. For instance: "this is an example". The FontWeight property set to bold sets all the string in bold, but I just need a part o it. Any comments? Thank you in advance!

Risposta accettata

Walter Roberson
Walter Roberson il 13 Lug 2016
Modificato: Walter Roberson il 13 Lug 2016
This is not possible for uicontrol style text or edit, but it is possible for uicontrol style pushbutton, listbox, radiobutton, or popup . For those, the first thing in the String property must be '<HTML>' . After that, put in appropriate HTML3 codes as needed. For example,
'<HTML>Hello, are you having <B>fun</B>?'
You do not need to </HTML>

Più risposte (1)

Hao Cheng
Hao Cheng il 18 Dic 2018
Sadly <HTML> doesn't work with 'text' and 'edit' style.

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by