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

Username:   Password: 
 RegisterRegister   
 Clearing Text Fields
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Pickles




PostPosted: Sun Apr 18, 2004 8:39 pm   Post subject: Clearing Text Fields

When the user inputs their text in the text field and hits enter, Is there a way to clear the text from it so they dont have to delete it themselves if they want to input new text?

My appologies if this has been discussed already, I searched for it but couldnt find anything of help.
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Sun Apr 18, 2004 8:59 pm   Post subject: (No subject)

You are refering to GUI textfields?

Try, GUI.SetText...

Or F10. It usually works.
Pickles




PostPosted: Sun Apr 18, 2004 9:11 pm   Post subject: ..

Ahh thats the stuff, thanks.. Its hard using this old turing.. it doesnt have any GUI help on it..

And finally..

Is there a way to resize the text, it doesnt seem to want to work for me.. I just have it via slider like so:
code:
font1 := Font.New ("ariel:textSize")
assert font1 > 0

procedure VerticalSliderMoved (value : int)
    textSize := value
    locatexy (60, 110)
    put value
end VerticalSliderMoved


the value moves but the text size doesnt change.. no matter what i have it set to
Delos




PostPosted: Sun Apr 18, 2004 9:21 pm   Post subject: (No subject)

Um...are you trying to draw fonts w/ the 'put' command. Coz you can't. Really, no, you can't!


Font.Draw (txtStr : string, x, y, fontID, Color : int)


You need to update your Turing. Check out the main page.
Pickles




PostPosted: Sun Apr 18, 2004 9:24 pm   Post subject: ..

Yeah im putting the font with Font.Draw but it doesnt want to change the size of it

Can't update turing.. the damned teacher marks in this so if i have any commands that arent in this one(ie. View.Update) it wont work
Delos




PostPosted: Mon Apr 19, 2004 11:47 am   Post subject: (No subject)

Well, that's no problem. Update still, and you'll have the newer help file, but keep an older copy of Turing available. Thus ways, you can run your new proggies from it, to make sure that all the commands you used existed then.

I just noticed, you said:
Quote:

font1 := Font.New ("ariel:textSize")


Methinks you ought to change that to something to the effect of:
code:

var font : int

var num : int
put "?"
get num

font := Font.New ("Ariel:" + num)

Font.Draw ("Hello World", 100, 100, font, 7)


Should give you an idea...

Oh yeah, almost forgot, the code I posted is buggy...intentionally ofcourse. Find the error and fix it, why don't you, make you work a bit for the help you receive Laughing .
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  [ 6 Posts ]
Jump to:   


Style:  
Search: