I have multiple strings with the same length, but they appear to need a different amount of tabstops to format properly. I am unsure on what too google for and I haven't gotten any results that would have helped me so I am asking here.
What would be a good solution for this other than creating multiple controls, which I do not want...
Look at Malzahar and Kassadin ( same length, same amount of tabstops, malzahar's format is messed up ) Current code:
if (_counter.zCounter[i].Length <= 8)
{
DataCollection += _counter.zCounter[i] + "\t\t↑" + _counter.zUpvotes[i] + "\t↓" + _counter.zDownvotes[i] + "\n";
}
else
DataCollection += _counter.zCounter[i] + "\t↑" + _counter.zUpvotes[i] + "\t↓" + _counter.zDownvotes[i] + "\n";
A strings Length (number of characters) is only loosely related to its Width (number of pixels).
Your approach will only work with fixed-width fonts (like Courier). Otherwise, you would need to use a Measure() function and compute the spaces/tabs for a specific font. Messy.
Much better to change your GUI to have 2 columns.