Click here to Skip to main content
13,800,880 members
Rate this:
 
Please Sign up or sign in to vote.
See more:
Hi,

how can I do visible only range of textboxes.

For example:

In textbox100 will be value 10 and I would like to do visible only first 10 textboxes and next hide.

is it possible?

What I have tried:

I have not tried anything yet
Posted 6-Dec-18 6:18am
Updated 6-Dec-18 6:58am
Comments
F-ES Sitecore 6-Dec-18 11:27am
   
Website? Windows Forms? WPF?
Fiínek Cahů 6-Dec-18 11:46am
   
windows forms

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Iterate through the Controls collection, and set Visible to false:

Dim count As Integer = 0

For Each c As Control In Controls
    Dim tb As TextBox = TryCast(c, TextBox)

    If tb IsNot Nothing Then
        count += 1
        tb.Visible = count <= 10
    End If
Next
  Permalink  
Comments
Fiínek Cahů 6-Dec-18 12:35pm
   
thank you
OriginalGriff 6-Dec-18 13:34pm
   
You're welcome!
Fiínek Cahů 6-Dec-18 12:58pm
   
And control if textbox contain some text? if contain then select next textbox?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web05 | 2.8.181215.1 | Last Updated 6 Dec 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100