Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

instant line length?

18 views
Skip to first unread message

Jim Y

unread,
May 23, 2004, 10:45:49 PM5/23/04
to
I know that I can determine the length of a line as in sngLineLnth = Printer.TextWidth(Text1.Text).
Because I have a limited printed space, say 5 inches, I want to control (?) the input length to
prevent losing the end of a line too long (like this sentence). My idea is: I set the printed font
size, say Arial 10, and as the user types the statement in a text box, a window/form continuously
displays the line length in inches and warns the user when the line length exceeds 5 inches. I have
done something similar to this using a command button, but that is a type and click method. (Kind
of crude method.)

Is it possible to indicate the length of a typed line (automatically update) as the user enters it
in the text box with no user action other than typing the message? If yes, how do I do it?

Thank you,
Jim Y


Joe "Nuke Me Xemu" Foster

unread,
May 23, 2004, 10:59:19 PM5/23/04
to
"Jim Y" <j.s.ya...@NOSPAMatt.net> wrote in message <news:xldsc.21191$fF3.5...@bgtnsc05-news.ops.worldnet.att.net>...

Use Text1_Change?

--
Joe Foster <mailto:jlfoster%40znet.com> "Regged" again? <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above They're coming to
because my cats have apparently learned to type. take me away, ha ha!


J French

unread,
May 23, 2004, 11:27:51 PM5/23/04
to

Simply calc and display in the Textbox's Changed event

Jim Y

unread,
May 24, 2004, 12:11:32 PM5/24/04
to
It does the job. I appreciate the help. Thanks to both of you.
I truly appreciate this newsgroup. I have received answers to all of my questions, something the
texts that I purchased have not been able to do.

Thank you,
Jim Y

"Jim Y" <j.s.ya...@NOSPAMatt.net> wrote in message
news:xldsc.21191$fF3.5...@bgtnsc05-news.ops.worldnet.att.net...

Rogue Rabbit

unread,
Oct 19, 2004, 5:35:04 PM10/19/04
to
Yup, just put your code in the Text1_Change() event.

rr

0 new messages