get value of textbox

huaner

12-10-2007 09:33:43

hi:
i just found the function of textbox::getCaption() may has some questions.
if the value which display in the textbox is out of the length of this textbox, when i get this value again, this value is wrong. e.g.
textbox::getText()::setCaption("AligmentLine1");
when i get it later, the value may be "igmentLine1".
maybe there is something about me. but l also want to post it.so, i hope you don't mind. :)

kungfoomasta

12-10-2007 16:53:58

It could be a bug, I'll have to check the code. The TextBox should have its own UTFString::mCaption, and the Text object itself has a mCaption member, but the TextBox's caption is represented by what is seen on screen, and may not reflect the entire caption.

I could be returning the Text object's caption and not the TextBox's caption. Thanks for pointing this out, I'll take a look at it when I have a chance.

kungfoomasta

13-10-2007 11:09:31

Dang, sorry.. I misread your post! :oops:

If you want the full caption, use TextBox::getCaption. If you use Text::getCaption, you will only get the text that is rendered to screen.

I double checked.. no bug in the code that I see. I just misunderstood your post. Sorry again.