Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Text Box Entries


Reply
 
Thread Tools Display Modes
  #1  
Old 03-17-2004, 04:56 PM
Zooker Zooker is offline
Junior Contributor
 
Join Date: Jun 2003
Posts: 227
Unhappy Text Box Entries


I have put several Text Box's on a Form and assigned this as Text in the Text Box's property sheet "[- Available -]". When I try to Type something in th TextBox it won't do it nothing Happens. Do I have to erase what's in the Box and Then Type or What?
Reply With Quote
  #2  
Old 03-17-2004, 05:31 PM
trinkus79's Avatar
trinkus79 trinkus79 is offline
Centurion
 
Join Date: Jan 2004
Location: Portland, OR
Posts: 161
Default

you will need to delete that text to type in the box.
You can leave the text as "[- Available -]" if you want but put an "onfocus" event in your code to automatically delete it...something like ...

Private Sub txtThisbox_OnFocus()
txtThisbox.text = ""
End Sub()

something along those lines.
Reply With Quote
  #3  
Old 03-17-2004, 05:49 PM
Zooker Zooker is offline
Junior Contributor
 
Join Date: Jun 2003
Posts: 227
Unhappy Text Box ntries

Where &or when do I call This OnFocus routine?
Reply With Quote
  #4  
Old 03-17-2004, 09:28 PM
Zooker Zooker is offline
Junior Contributor
 
Join Date: Jun 2003
Posts: 227
Question Text Box Entry's

It never clears. If I hi-lite & press delete it comes up invalid procedure & crashes. I want to be able to Type Over it and accept what I typed, and If I want 1 of the 8 text boxes to accept the text in the original text box to be able to skip over that box. Its a very simple idea. But 1 this wonderful world of event programing can't seem to accomplish.!
Reply With Quote
  #5  
Old 03-17-2004, 09:45 PM
trinkus79's Avatar
trinkus79 trinkus79 is offline
Centurion
 
Join Date: Jan 2004
Location: Portland, OR
Posts: 161
Default

I'm sorry, it's supposed to be GotFocus, not onFocus...I'm getting my programming languages mixed up again...


Private Sub Text1_GotFocus()
Text1.Text = ""
End Sub

That should clear out the textbox when it get the focus, either by clicking it or by tabing to it.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading Text Files and Progress Bar Ashon General 13 05-05-2004 10:55 AM
Searching Text in between 2 tags Mohanme_2000 Word, PowerPoint, Outlook, and Other Office Products 1 02-21-2004 11:20 PM
Reading the Word Document from Visual Basic without Opening the Word Applicaiton Mohanme_2000 Word, PowerPoint, Outlook, and Other Office Products 6 02-20-2004 11:03 PM
Setting the curser position in a text box MTgeekMAN General 2 01-09-2003 08:49 PM
Combo box text disapearing Spike General 7 03-08-2002 10:55 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->