yllee
asked on
Swap Text
I am coding a program which I intend to have an input string of 100 in a given message box. Just like the message box that I preparing this questin in Experts Exchanges question form. I want the input swap automatically within given message box. How can I do so?
Does your proggy have sevral "message box"??? and you wanna swap between those boxes???
'Cos if so i made a little code for that (in TP), and it's pretty good.
'Cos if so i made a little code for that (in TP), and it's pretty good.
ASKER
Okay, let make myself clear. Let say I have 5 X 8 X 10 size of message box. When I input string of 100 in this box, the string/word or whatever, will automatically swap to second line when it reach boundary of the box. For example :
|------------------------- ---------- ---------- ---------- --------|
| This is a testing. This is a testing. This is |
| a testing. This is a testing. |
|------------------------- ---------- ---------- ---------- --------|
|-------------------------
| This is a testing. This is a testing. This is |
| a testing. This is a testing. |
|-------------------------
ASKER
Okay, let make myself clear. Let say I have 5 X 8 X 10 size of message box. When I input string of 100 in this box, the string/word or whatever, will automatically swap to second line when it reach boundary of the box. For example :
|------------------------- ---------- ---------- ---------- --------|
| This is a testing. This is a testing. This is |
| a testing. This is a testing. |
|------------------------- ---------- ---------- ---------- --------|
Thank you.
|-------------------------
| This is a testing. This is a testing. This is |
| a testing. This is a testing. |
|-------------------------
Thank you.
ok, I understand now... That shouldn't be too hard to do... Questions:
The message, is it only one string or is it more?
This should be for textmode right?
If you want a procedure, could you tell me how it should work? Wich parameters that should be send and so on!
regards Hypo!
The message, is it only one string or is it more?
This should be for textmode right?
If you want a procedure, could you tell me how it should work? Wich parameters that should be send and so on!
regards Hypo!
You know the boundaries of the textbox, so you can write the text char by char till the border is reached and then (if the string isn't empty) start a new line. I used such a thing in text mode, graphical mode should be the same. Thing is: just keep track of the location of the char you want to write and the border of the box.
hmmm... You want that word swaping effect right? It would be a little more complicated then, but still it should not be too hard.
ASKER
It is only one string (string[100]). No care about the parameter. I just want to have a general procedure to do so.
Thank you.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Adjusted points to 150
Thanks... ;)
Is it the characters within the message string you want to swap?