Text for a text field

Hi!
I progam a text field like one from the internet explorer.
I need a method to get the textwidth to charge the showrange.

http://mitglied.lycos.de/b534463/eingabe.jpg

glGetInteger (GL_TEXT_FIELD_WIDTH);