943,974 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 314
  • VB.NET RSS
Dec 9th, 2008
0

TabbedControl Search

Expand Post »
Hello sir,
I am using Visual studio 2005.
I am having more link labels on a form under a tabbed control.
I want to search for certain linklabels in a form. So i used the coding below, But it is displaying the search in the corresponding tabs itself. But i want my search to be displayed in new tab under the same tabbed control.
Can anyone help me in this?
VB.NET Syntax (Toggle Plain Text)
  1. Private Sub Button1_Click( _
  2. ByVal sender As System.Object, _
  3. ByVal e As System.EventArgs _
  4. ) Handles Button1.Click
  5.  
  6.  
  7. For Each page As TabPage In Me.TabControl1.TabPages
  8. For Each ctl As Control In page.Controls
  9. If TypeOf ctl Is LinkLabel Then
  10. ctl.Visible = (ctl.Text.IndexOf(txtSearch.Text, StringComparison.CurrentCultureIgnoreCase) <> -1)
  11. End If
  12. Next
  13. Next
  14. End Sub
Reputation Points: 8
Solved Threads: 3
Junior Poster
bharanidharanit is offline Offline
140 posts
since Nov 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Exporting to PDF in VS2005
Next Thread in VB.NET Forum Timeline: Copy To Clipboard





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC