Everything2
Near Matches
Ignore Exact
Full Text
Everything2

TextBox

created by Matt_t_hat

(thing) by Matt_t_hat (2.3 mon) (print)   ?   (I like it!) Mon Mar 17 2003 at 18:19:35

Visual Basic Properties 101: Text Box - a box that contains text.

The main property of a textbox is .Text this contains a value.

Example:

Textbox.Setfocus
Textbox.text = "Hello world" :: Would set the value at run time.
My string = Textbox.text :: would read out the value.

Better less crashable Example:

Textbox.Value = "Hello world" :: Would set the value at run time.
My string = Textbox.value :: would read out the value.

Interestingly if you try to use Textbox.text which due to some fairly complicated object theory the text ("Physicly typed in") is different in terms of how you use it to the value stored even though they may be the same. To paste text into a text box you would need to use Textbox.Setfocus which is the code version of clicking on the text box to put the curser there.

The textbox control has a large number of properties these are the "main" ones (The ones I use most).

Property          Effects

Text	         Text (as mentioned)
MultiLine         whether the text box can display multiple lines
Visible	         Can I see it?
Active	         Can it be used?
BackColor         Background Colour
BackStyle         Back style - Opaque or Transparent
ForeColor         Text Colour
Value             The string value of the text 
SelLength         Length of a given selection
SelText	         Selected Text
SelStart          Start Position of a given selection
Name	         TextBox Name Unless you have a real good reason for messing with 
                  this other than in runtime just don't do it.
The main functionality you are likely to want to explore is that of the text content. If your program is going to allow users to enter text that you wish to manipulate in some way (say for a database or basic notepad clone) then you will need to act on the Textbox.Text property.

You may wish to investigate rich textbox.
I once was sure others would love to give greater depth with further WU's.


printable version
chaos

text Visual Basic For a recreational activity to cause any degree of distress is simply unacceptable Hello World
visible rich text How to build a projection TV for $9.99 property
functionality siglum plain text CD Text
Chatterbox Text Adventures Silly me slam book VBScript
IDE Repetition is the death of the soul Seeing your node in the Random Nodes nodelet Prayer to St. Isidore for Forgiveness of Malicious Softlinkers
Transmission Control Protocol / Internet Protocol Text of Commencement Address at Bard College, May 25th, 1996 Goth Culture inter-quartile mean
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Look at this mess the Death Borg made!
The 1989 U.S. Invasion of Panama
Hot chocolate
Tao Te Ching
Everything Editor Logs
All the dead artists
A beam from an angry star
The summer after high school
Henry VIII
Scenes from a Memory
Eddie would go
Glamis Castle
Gargouille
Religious dietary laws and restraints
New Writeups
Heitah
Why I love Everything2(person)
trixingee
Dungeon Mastering for the first time(idea)
Netrat0
It's Called Subtext, Honey(person)
eyeofthebeholder
The Dragon(idea)
Heitah
consist, comprise, constitute, or compose(idea)
Meezzio
Gotlandssnus(thing)
argv
Astral Plane(idea)
Madara
One Winged Angel(fiction)
Tom Rook
Talk is cheap(poetry)
shaogo
Adelle Davis(person)
Aerobe
race car g sfjsgsd(poetry)
Binah
Dream Log: July 5, 2008(dream)
StrawberryFrog
Forgotten things in space(idea)
antigravpussy
velvet revolution fairy tale(idea)
Heitah
Nerve agent VX(thing)
E2 is a by-product of the existence of The Everything Development Company