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
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
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
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 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
RE: Drawing text boxes withing Pascal