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

Username:   Password: 
 RegisterRegister   
 GUI (Scrollbars,textfields)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Geminias




PostPosted: Wed Dec 21, 2005 12:05 pm   Post subject: GUI (Scrollbars,textfields)

hey all. for my final project i want to make a web spyder with a GUI. My gui will basically be a search button and a text field, like where you type the url in internet explorer, and also a scrollbar beneath that. i dont see any good documentation on how to make a good textfield nor do i see anything on how the scrollbars work. I made this scroll bar, but it does scroll the page or anything.

Again, the objective is to make an internet explorer (highly simplified) gui, so beneath the search textbox this is where the netstreams will pile in. So i want to make it a scrollable page so you can see all the netstream BUT i want the search field to remain at the top independant of the scrolling mechanism. Just like IE.

Anyone got any good documentation on how to pull this off? or would like explain it to me?

thanks in advance,
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Dec 21, 2005 12:27 pm   Post subject: (No subject)

you already figured out how to read, parse and render all of the HTML content, correct?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Geminias




PostPosted: Wed Dec 21, 2005 12:35 pm   Post subject: (No subject)

yes but i also kind of lied, its not exactly a web spyder. What it is is sort of irrelevant, i just need some help with the GUI.
Cervantes




PostPosted: Wed Dec 21, 2005 1:55 pm   Post subject: (No subject)

For the textfield: http://www.compsci.ca/v2/viewtopic.php?t=9329

Knowing about classes would help. We've a tutorial on them. Check the Turing Walkthrough.

Essentially, for the text field, you get input simply enough (I used if hasch then; getch (ch); end if). You add it on to (concatinate) the your string. But the thing is, you don't draw the entire string. You can Font.Draw the entire string, but you have to position it appropriately and use View.Clip.

This is something that can easily be done in steps. First, get the input right. Then add a cursor and allow yourself to move it with the arrow keys. I recommend storing the position of the cursor in two variables. When no text is selected, these two variables will be identical. However, when you later on get to highlighting text, the two values will be different. One will be the initial cursor location, and the second will be the reference to that. Thus, you might have your initial at position 5, and your final/reference at position 3, so you'll be drawing a blue highlighting box from position 5 to position 3.
Geminias




PostPosted: Wed Dec 21, 2005 4:26 pm   Post subject: (No subject)

thanks for the help cervantes, exactly what i needed.
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: