
-----------------------------------
sarm2005
Wed Mar 19, 2008 8:40 am

Create a button with text that changes.
-----------------------------------
So I want to add a button to my program with GUI,CreateButton. How do I make the text on the button change each time it's clicked?

-----------------------------------
sarm2005
Wed Mar 19, 2008 8:50 am

Re: Create a button with text that changes.
-----------------------------------
Help plz.

-----------------------------------
darkangel
Mon Mar 24, 2008 11:08 pm

Re: Create a button with text that changes.
-----------------------------------
var yourButton  := GUI.CreateButton (x, y, length, "Text", yourProcedure)
...then in your procedure when you want it to change.....

GUI.Dispose (yourButton)
yourButton  := GUI.CreateButton (x, y, length, "New Text", yourProcedure)
GUI.Refresh
 
Although try NOT to use turing's GUI, ....it sucks, and is poorly done, try making your own, it will turn out better.

-----------------------------------
Carey
Tue Mar 25, 2008 11:08 am

RE:Create a button with text that changes.
-----------------------------------
You can use the GUI.SetText() feature as well. (Name might be wrong, I don't have Turing on this comp)

-----------------------------------
darkangel
Tue Mar 25, 2008 6:35 pm

Re: Create a button with text that changes.
-----------------------------------

You can use the GUI.SetText() feature as well. (Name might be wrong, I don't have Turing on this comp)

naw, thats just for Text Fields



Side note: IS THERE ANY WAY OF GETTING FROM A "Text Box"? I know you can get from a "Text Field" using the GUI.GetText, but it doesn't work for boxs'. I would really want to try and avoid making my own GUI.
