MattHiggs Posted May 1, 2016 Posted May 1, 2016 (edited) Is there a control style to make labels span multiple lines, because I am not seeing one.. And I would think that, since the control itself is just displayed text, it would have something like that.... Edited May 1, 2016 by MattHiggs
InunoTaishou Posted May 1, 2016 Posted May 1, 2016 You can use CR/LF/CRLF in a label to make it move to the next line. There is no default way to make a long string for a label break up into multiple lines, like an edit. The easiest way to do it would be to use an edit control with the $ES_READONLY. The next best thing would be to check out this thread I posted in a while back Which will measure the string against the control and break it up into an array, each row representing a line.
Moderators Melba23 Posted May 1, 2016 Moderators Posted May 1, 2016 MattHiggs, Take a look at my StringSize UDF (the link is in my sig) - it allows you to wrap a long string into a given width or determine what size label you need to fit the string. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Reveal hidden contents ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Skysnake Posted May 1, 2016 Posted May 1, 2016 $idMainlabel = GUICtrlCreateLabel($sMainstatus, 4, 112, 616, 350, $SS_LEFT + $SS_NOPREFIX) and then ;reset main status $sMainstatus = $sMainstatus & StringLeft($textlabel, 25) & StringRight($textrpt, 15) & @CRLF GUICtrlSetData($idMainlabel, $sMainstatus) the StringLEFT and StringRIGHT allows you to build two columns in your label. Skysnake Why is the snake in the sky?
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