• SetWrap vs SizeToContents
    4 replies, posted
Hi, what is the difference between SetWarp(true) and SizeToContents()? In the docs I saw no difference.
What? They are 2 entirely different things. https://wiki.garrysmod.com/page/Panel/SetWrap https://wiki.garrysmod.com/page/Panel/SizeToContents Where does it imply they are the same?
SetWrap is a function for wrapping text for DLabel. Example of wrapping (First is not wrapped): http://wiki.garrysmod.com/images/1/13/Panel_SetWrap_example1.png SizeToContents works for more panels and it's function to SetSize for panel according to content inside it.
Kay, but is there any good example for SizeToContents.
yeah that means it takes the physical size of the text in the DLabel, and makes the DLabel big enough to perfectly fit the text
Sorry, you need to Log In to post a reply to this thread.