WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Need Help! Crop Text... (https://www.wowinterface.com/forums/showthread.php?t=48834)

Mr.Dio 01-20-14 09:06 AM

Need Help! Crop Text...
 
Hello, please tell me. How to crop a text that goes beyond the frame.

Sorry for my english :(

jaliborc 01-20-14 09:43 AM

I think you will need to parent it to a ScrollFrame. There might be other solutions, but I think this is the onyl one.

Malsomnus 01-20-14 11:58 AM

I'm almost certain you can achieve that by using :SetWidth().

Clamsoda 01-20-14 12:34 PM

Quote:

Originally Posted by Malsomnus (Post 289898)
I'm almost certain you can achieve that by using :SetWidth().

SetWidth() on a string results in "..." truncation, which he doesn't want, as indicated by the amazing MS Paint photo =3.

Mr.Dio 01-20-14 01:08 PM

Quote:

Originally Posted by Malsomnus (Post 289898)
I'm almost certain you can achieve that by using :SetWidth().

This Is not work :(
Quote:

Originally Posted by jaliborc (Post 289893)
I think you will need to parent it to a ScrollFrame. There might be other solutions, but I think this is the onyl one.

Thx! Great works!

Quote:

scrollframe = CreateFrame("ScrollFrame")
scrollframe:SetSize(50, 20)
scrollframe:SetPoint("CENTER")

content = CreateFrame("Frame", nil, scrollframe)
content:SetSize(200, 20)
content:SetPoint("CENTER")
text = content:CreateFontString("PlayerHealthPTextFrame", "OVERLAY")
text:SetAllPoints()
text:SetFont("Fonts\\FRIZQT__.TTF", 8, "OUTLINE")
text:SetText("Interface\\GLUES\\MainMenu\\Glues-BlizzardLogo")
text:SetWordWrap(false)
scrollframe:SetScrollChild(content)


All times are GMT -6. The time now is 08:30 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI