DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   VB.NET (http://www.daniweb.com/forums/forum58.html)
-   -   TabbedControl Search (http://www.daniweb.com/forums/thread161407.html)

bharanidharanit Dec 9th, 2008 3:12 am
TabbedControl Search
 
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?
Private Sub Button1_Click( _
    ByVal sender As System.Object, _
    ByVal e As System.EventArgs _
) Handles Button1.Click
 
 
        For Each page As TabPage In Me.TabControl1.TabPages
            For Each ctl As Control In page.Controls
                If TypeOf ctl Is LinkLabel Then
                    ctl.Visible = (ctl.Text.IndexOf(txtSearch.Text, StringComparison.CurrentCultureIgnoreCase) <> -1)
                End If
            Next
        Next
    End Sub


All times are GMT -4. The time now is 4:12 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC