Game Development Community

Retrive text from a button

by Kyle Cook · in Torque Game Engine · 06/10/2006 (10:57 am) · 4 replies

Is there a way to retrieve the text field from a button?

Here are my shoddy example..

Button.getText();

I know there is a Button.setText(); function and was wondering if there is a way to retrieve the text as well..

#1
06/10/2006 (11:10 am)
Try using:

Button.text;

Hopefully this will get you what you were looking for.
#2
06/10/2006 (11:20 am)
I have this for the command on the button.

Text.setText(Button.text;);

I have also tried this..

Text.setText(Button.text(););

Getting "Syntax error in input." error.
#3
06/10/2006 (11:25 am)
Try the following instead:

Text.setText(Button.text);
#4
06/10/2006 (11:26 am)
Thanks a million! That works.