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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Box question

Status
Not open for further replies.

WalfdPD

MIS
Apr 22, 2005
14
US
I am using a bound text box on my forms to display an agency name. The textbox is bound to a dataset which contains the agencies name/address etc. The reason for this is so that the end user can enter whatever agency description he/she wants to appear on the form header.

My problem is that when the form displays, the data in the textbox is highlighted and only appears normal if it is clicked on. Is there anything in the property list which I can invoke to have the text display normally when the form is displayed?
 
entered it;
txtAgencyName.Select(0, 0)

End Sub
End Class
and it still displays highlighted
 
In which sub did you enter it? If you put it form load, the data events will fire later. You'll need to find the last event that fires. I'm not too familiar with bound control events, but look in the overloads youn might find something. The other way would be to use the txtAgencyName.gotfocus and set the select(0,0) in there. If that doesn't work, you may be able to use a different event off of the text box.

-Rick

----------------------
[banghead]If you're about to post an ASP.Net question,
please don't do it in the VB.Net forum[banghead]

[monkey] I believe in killer coding ninja monkeys.[monkey]
 
I put it in the textchanged sub but moved it to the load sub and now it works as I want it to.
Many Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top