|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help.ShowPopup for all Textboxes on Form?I have a large number of forms which contain an equally large number of textboxes within (All textboxes have a prefix of txt before their name). Is there a way that I can have the Help.ShowPopup to display the contents of the textbox in which the mouse is hovering over? The issue is that there is text in the text boxes, but cannot be seen as the text is longer than the textbox. I can use the following to display the contents of the textbox, but am hoping there is a way that can work for all of the textboxes rather than copying the same three lines per textbox as shown below: Private Sub txtFullName_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtFullName.MouseHover Help.ShowPopup(Me, txtFullName.Text, Cursor.Position) End Sub Thanks in Advanced. LD > Private Sub txtFullName_MouseHover(ByVal sender As Object, ByVal e The "Handles" statement says which events are handled by your method.> As System.EventArgs) Handles txtFullName.MouseHover > Help.ShowPopup(Me, txtFullName.Text, Cursor.Position) > End Sub All you need to do is change the handles to include the other textboxes: Private Sub txtFullName_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtFullName.MouseHover, txt2.MouseHover, txt3.MouseHover, txt4.MouseHover Help.ShowPopup(Me, txtFullName.Text, Cursor.Position) End Sub Also, if you select all your textbox in the designer you should be able to open the properties tab, set it to show events, and then select "txtFullName_MouseHover" from the drop down list of choices for MouseHover. Then the designer should take care of adding the events to the method's Handle statement. Thanks, Seth Rowe On May 2, 6:42 am, Dean Richardson <advertis***@deanrichardson.com> wrote: Show quoteHide quote > Hello, > > I have a large number of forms which contain an equally large number > of textboxes within (All textboxes have a prefix of txt before their > name). Is there a way that I can have the Help.ShowPopup to display > the contents of the textbox in which the mouse is hovering over? > > The issue is that there is text in the text boxes, but cannot be seen > as the text is longer than the textbox. > > I can use the following to display the contents of the textbox, but am > hoping there is a way that can work for all of the textboxes rather > than copying the same three lines per textbox as shown below: > > Private Sub txtFullName_MouseHover(ByVal sender As Object, ByVal e > As System.EventArgs) Handles txtFullName.MouseHover > Help.ShowPopup(Me, txtFullName.Text, Cursor.Position) > End Sub > > Thanks in Advanced. > > LD
Process.Start woes in ASP.Net application
regular expression question Row Update Not Updating Data source System tray icon does not always show when starting app when Windows starts Suggestions to learn vb.net Best method to parse this flat file Datasource question If else and what ever :( (Newbie) Access DB Upgrade get DB results from inner join update |
|||||||||||||||||||||||