Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Create a button with text that changes.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
sarm2005




PostPosted: Wed Mar 19, 2008 8:40 am   Post subject: 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?
Sponsor
Sponsor
Sponsor
sponsor
sarm2005




PostPosted: Wed Mar 19, 2008 8:50 am   Post subject: Re: Create a button with text that changes.

Help plz.
darkangel




PostPosted: Mon Mar 24, 2008 11:08 pm   Post subject: Re: Create a button with text that changes.

code:
var yourButton  := GUI.CreateButton (x, y, length, "Text", yourProcedure)

...then in your procedure when you want it to change.....

code:
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




PostPosted: Tue Mar 25, 2008 11:08 am   Post subject: 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




PostPosted: Tue Mar 25, 2008 6:35 pm   Post subject: Re: Create a button with text that changes.

Carey wrote:

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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: