• Can I horizontally center long string DLabels?
    8 replies, posted
I think the title may be sort of confusing, but I can't for the life of my figure out how to properly center a long string. What I have so far ([URL="https://i.gyazo.com/922103ec77048463cd1fddd2883af0e5.png"]here[/URL]) can't really be perfectly centered with just tabs/spaces. I was wondering if there's a way to automatically do it.
[QUOTE=VeXan;50724792]I think the title may be sort of confusing, but I can't for the life of my figure out how to properly center a long string. What I have so far ([URL="https://i.gyazo.com/922103ec77048463cd1fddd2883af0e5.png"]here[/URL]) can't really be perfectly centered with just tabs/spaces. I was wondering if there's a way to automatically do it.[/QUOTE] [URL="https://wiki.garrysmod.com/page/Panel/SetContentAlignment"]SetContentAlligment()[/URL]
I'm using that to put it in the center of the DFrame, but I want the text to be centered, so it looks good. E [QUOTE][IMG]https://i.gyazo.com/8dba0811019e9444d6f4f3d3ddb006e5.png[/IMG][/QUOTE]
[QUOTE=VeXan;50724910]I'm using that to put it in the center of the DFrame, but I want the text to be centered, so it looks good.[/QUOTE] Excuse me on my cluelessness but what's "it"
DLabel. That's what I'm using the long string for.
--snip-- I'm stupid
[QUOTE=MelonShooter;50724964]You can use setcontentAllignment on the label and it will center the text![/QUOTE] [IMG]https://i.gyazo.com/ebccc2436ff8680a91e225ba1a50f37c.png[/IMG] Using SetContentAlignment( 8 )
*facepalm* nvm I'm being stupid...
[QUOTE=MelonShooter;50724992]*facepalm* nvm I'm being stupid...[/QUOTE] Lol, it's fine man.
Sorry, you need to Log In to post a reply to this thread.