Darien Posted September 11, 2017 Posted September 11, 2017 Hello, How to bold part of the text in a GUI label?
water Posted September 11, 2017 Posted September 11, 2017 I do not think this is possible using pure AutoIt. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
mikell Posted September 11, 2017 Posted September 11, 2017 It's not possible using a label . But you might use a workaround, by joining several labels, or using a richedit control instead of a label
Moderators JLogan3o13 Posted September 11, 2017 Moderators Posted September 11, 2017 As @mikell mentions, I typically just use several labels: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 300, 80) GUISetFont(11, 400, Default, "Arial") $sLabel1 = GUICtrlCreateLabel("This is the", 10, 10, 85, 30) $sLabel2 = GUICtrlCreateLabel("beginning", 100, 10, 87, 30) $sLabel3 = GUICtrlCreateLabel("of my text.", 192, 10, 85, 30) GUICtrlSetFont($sLabel2, 11, 600, Default, "Arial") GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Darien Posted September 11, 2017 Author Posted September 11, 2017 Putting together several labels would be tricky for me. How do I use richedit control?
Moderators JLogan3o13 Posted September 11, 2017 Moderators Posted September 11, 2017 The help file has a very nice example under _GUICtrlRichEdit_Create "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
UEZ Posted September 11, 2017 Posted September 11, 2017 (edited) Here the label version: Edited September 11, 2017 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Darien Posted September 11, 2017 Author Posted September 11, 2017 Very good, UEZ, but unfortunately your script does not work with texts that contain more than one line. I will try the richedit control.
UEZ Posted September 11, 2017 Posted September 11, 2017 Of course there is a possibility for multi line support but you will ask also for other features such as how to change the font for each char, etc. That means using label controls makes the life more complicated for such "simple" feature and is not designed for it. Rich Edit is much more powerful and more easy to handle such kind of requirements. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now