I have a custom button that needs to use graphics.drawstring for its text property. Does anybody know how to get what the string’s length will be when it's on the screen. It'd be great if you where able to view the code from the class Buttonbase to see how it's done.

At the moment I just have a hidden label that gets added to the same parent container as the button and then read the labels width property

Any suggestions?
Ger