EDIT: I started over with my explanation. What I'm referring to is for textblocks and not textboxes, but you could implement some kind of similar method for textboxes that you type into.
-Big wall text needs to be put inside small textblock that has autowrap enabled
-You want to break up the wall of text into "pages" that will fill the block
-Based on the current font settings, you need to know how many lines you can fit in there
So what I propose is some kind of function that looks like the following:
Inputs:
-Text trying to be fit into block
-Which textblock
-Possibly have inputs for font settings like if you were getting ready to display with different font settings?
Outputs:
-Boolean that outputs true if it fits, false if it doesn't
-Integer that outputs how many lines fit
-Text portion that fits into the textblock
-Remainder of the text that doesn't fit?
Though I suppose if it has this kind of carry over output like this, you wouldn't really need it to output the number of lines, but it still might be useful for something...
Announcement
Collapse
No announcement yet.
Get number of Lines in 'Text' Widget - Function
Collapse
X
-
Moth Doctor repliedBut why? Shouldn't be text auto-wrapped separately in the next widget?
Leave a comment:
-
IronicParadox repliedOriginally posted by BrUnO XaVIeR View PostIf Epic implement that function it would do exactly the same thing.
Count line breaks and return a number.
text wrapping is not line break.
Leave a comment:
-
BrUnO XaVIeR repliedIf Epic implement that function it would do exactly the same thing.
Count line breaks and return a number.
text wrapping is not line break.
Leave a comment:
-
IronicParadox repliedOriginally posted by BrUnO XaVIeR View PostYou can simply convert to string and split by "\n" into an array then count elements in array.
Leave a comment:
-
BrUnO XaVIeR repliedYou can simply convert to string and split by "\n" into an array then count elements in array.
Leave a comment:
-
Get number of Lines in 'Text' Widget - Function
Hello, i think title speak for itself. Function must show number of lines in 'Text' Widget, for multi-line or single-line.
This function will be very useful for safe and easy transfer text from page to page for example.
Please, dear Epic GamesLast edited by Bormak; 07-31-2019, 06:27 AM.Tags: None
Leave a comment: