Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help on Text Widgets

Status
Not open for further replies.

SmallProgram

Programmer
Feb 6, 2002
42
IN
Hello Everybody there,
I am stuck with a problem again.
I want to know whether we can get the information(Data) that we type in a text box.
If we can can you suggest me one.
Mallik. Programmer,Amatuer
 
There are several ways to do this (assuming I understand correctly what you're after). I often use a textbox for editing so what I want, when it's done, is all the text:

set bfrlst [split [$w.tbx get 0.0 end] \n]

This takes all the data in the textbox ($w.tbx) and makes each line (by splitting on \n) a list element. You can be selective about gettng the text if you know something, either by absolute location or tag, about where in the textbox the data you want is. "linestart" and "lineend" refer to the beginning and end of the line on which the cursor is. "wordstart" and "wordend" refer to the beginning and end of the word where the cursor is. Bob Rashkin
rrashkin@csc.com
 
Thank you Mr.Bong Iam very Happy to learn the solution and hey I got rid of the problem Thank you again. Programmer,Amatuer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top