Is there a way to determine the TextWidth (NOT Length) of a string that is not currently in a Graphics object?
I have a string array and want to determine which element will require the widest display area. Using String.Length won’t work since it returns the number of characters and not all characters are the same width (in most fonts.)
My initial thought was to create a local graphics object and somehow put the strings, one by one, into it and get the TextWidth of each but I can’t seem to figure out how.
Is this the right path or is there another way to approach the question?
Any help would be appreciated.