Display "organized" string on GUI Label

Hello,

My (so far) LAST GUI question for at least a month:

(This is on a ridiculously high level of “for aesthetics only”)

How would I add a string to my GUI Label that is organized, where === is the Label, and Q = quantity, N = name, and T = type

  • ==Q==N===T
  • ==Q==N===T
  • ==Q==N===T
  • ==Q==N===T
  • ==Q==N===T

Right now I have:

  • ==Q==N=========T==
  • ===Q=N==T===
  • =Q==N========T

Does it work? Yes. Does it make a big difference? No. Will I be able to sleep right if I can’t do it? Of course not.

The current solution that I’ve found is more of a cpu/gpu overhaul where I create 3 different Labels on a foreach iteration, so that:

  • [==Q==][==L==][==T==]
  • [==Q==][==L==][==T==]
  • [Q][L][T]

So basically, 9 Labels for 3 Items.

Another crappy fix that I found was adding Spaces. It works perfectly until the quantity shifts, or the type shifts

I’m not sure what the question really is, but are you looking for string.Format?

Ex:

string.Format("{0}{1}{2}", var1, var2, var3);