×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Drawing text boxes withing Pascal

Drawing text boxes withing Pascal

Drawing text boxes withing Pascal

(OP)
Hi

I am pascal newbie and I have a graphics problem. Im trying to implement text boxes into my program. I only use the crt unit and then I use the Window command.

What I would like to do more specifically is, have 4 blocks on the screen and display seperate text in each block. This is the command I tried to use;

Window (1,20,80,25);
GotoXY (1,20);

Anybody got any suggestions on how to achieve this or
can you point me to some good basic graphics programming tutorials for Pascal.

TIA

RE: Drawing text boxes withing Pascal

See also Thread935-587129

The window procedure has nothing to do with the graphical windows you might be used to. When creating a window, all cursor operations happen within that window, so there's no need to call gotoxy(1,20) since you already are at that coordinate and within the window it is mapped to (1,1). To change something in another window, you must call the window function again.
The best way to see what the procedure does is: make a window, change the background color and execute a clrscr; then write a lot of text to the screen.

Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
http://student.vub.ac.be/~bvingerh/
Don't worry what people think about you. They're too busy wondering what you think about them.

RE: Drawing text boxes withing Pascal

(OP)
I've read somewhere that within Pascal(I use FreePascal)
the dimensions for the screen is 80 X 25.
If i use the window command, must the x and y inputs
conform to that standard or do I specify according to
pixel resolution (640 X 480).
Also if I create the text boxes and I want to use
them again later in my program, do I have to initialize
the window again?

Thanks,

RE: Drawing text boxes withing Pascal

If you've read Thread935-587129, you know that the window procedure merely masks out the rest of the screen; that's all it does! The top left coordinate of any window (including 80x25 window) is always (1,1).
If you want to write to another window, regardless of it "existing" already, you have to call the window procedure again. The locations of previously defined windows are not saved. The only use of the window procedure in my opinion is to make part of the screen scroll and to color certain areas of the screen.

Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
http://student.vub.ac.be/~bvingerh/
Don't worry what people think about you. They're too busy wondering what you think about them.

RE: Drawing text boxes withing Pascal

     You can't access pixels in text mode.  Everything is in the 80x25 mode.

RE: Drawing text boxes withing Pascal

to use graphics unic in pascal, use a code example. for example type circle in editror and press ctrl+f1 on it.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close