Computer Science Canada text field |
Author: | jrok311 [ Sat Apr 30, 2005 10:43 pm ] |
Post subject: | text field |
Is it possible in turing to make a text field more like a text box so that the user can have more than one line to type things on? Also is there a way to extract the text typed into the text field and use it later? For example if the user types in "name", can the word "name" can be used in a put statement later on? If this is possible, will this work with full sentences as well? Thanks |
Author: | Cervantes [ Sun May 01, 2005 7:33 am ] |
Post subject: | |
Are you talking about Turing's built-in GUI or making your own? |
Author: | jrok311 [ Sun May 01, 2005 11:40 am ] |
Post subject: | reply |
I was talking about turing's built in gui textfield, but if there is a way I can make my own that will do want I need it to do then that is fine also. |
Author: | jrok311 [ Sun May 01, 2005 3:41 pm ] |
Post subject: | reply |
I found out how to get the text used in the text field and use it where I need it but I still have my other questions from before like can the size of the field be changed? I also have a new question now, is there a way to clear the text field after the user presses enter? |
Author: | Cervantes [ Sun May 01, 2005 3:49 pm ] |
Post subject: | |
Check the help file for GUI.CreateTextBox. Also, if you want to make your own, it's not too difficult, though you'll need some pretty good programming skills. Knowing how to make your own classes would be especially useful. All in all, making one would require checking to see if it's clicked and checking for input (and certain keys such as the arrows, enter, delete, backspace, home, end, pg up, and pg down.), text wrapping, and scrolling. |
Author: | jrok311 [ Sun May 01, 2005 3:57 pm ] |
Post subject: | reply |
The problem with the text box is that it seems to me that it can only be used for output and the user cannot edit its contents, unless there is away around this... |
Author: | jrok311 [ Sun May 01, 2005 5:38 pm ] | ||
Post subject: | reply | ||
I am satisfied with the way I have the textboxes now but I just need to make it so that the text field gets cleared after you type something in it and so that all of the things that are in the textbow don't get erased when that happens. Here is my code so you can see what I mean. Thanks
|
Author: | Cervantes [ Sun May 01, 2005 7:39 pm ] | ||
Post subject: | |||
I believe the problem is that every time you enter text from the text field you reset the text box. That's not what you want. You just want to add a line.
|
Author: | jrok311 [ Sun May 01, 2005 8:01 pm ] |
Post subject: | reply |
Ok, thanks that helps a lot. Now there is just the thing about clearing the text field after you press enter to clear it every time. Thanks |
Author: | Cervantes [ Sun May 01, 2005 8:09 pm ] | ||
Post subject: | |||
updated procedure:
|
Author: | jrok311 [ Sun May 01, 2005 11:00 pm ] |
Post subject: | |
Thanks for all the help |