Darien Posted September 11, 2017 Share Posted September 11, 2017 Hello, How to bold part of the text in a GUI label? Link to comment Share on other sites More sharing options...
water Posted September 11, 2017 Share Posted September 11, 2017 I do not think this is possible using pure AutoIt. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
mikell Posted September 11, 2017 Share 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 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 11, 2017 Moderators Share 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! Link to comment Share on other sites More sharing options...
Darien Posted September 11, 2017 Author Share Posted September 11, 2017 Putting together several labels would be tricky for me. How do I use richedit control? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 11, 2017 Moderators Share 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! Link to comment Share on other sites More sharing options...
UEZ Posted September 11, 2017 Share 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Darien Posted September 11, 2017 Author Share 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. Link to comment Share on other sites More sharing options...
UEZ Posted September 11, 2017 Share 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
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