Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. sequence text boxes name

sequence text boxes name

Scheduled Pinned Locked Moved Visual Basic
csharp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kendo17
    wrote on last edited by
    #1

    i am trying to change the name of text boxes in vb.net as they are not in proper sequence 180 of them but it wont let me change name as invalid property textbox21 needs to be textbox40 and textbox40 needs to be textbox21 and so on any ideas

    T C M 3 Replies Last reply
    0
    • K kendo17

      i am trying to change the name of text boxes in vb.net as they are not in proper sequence 180 of them but it wont let me change name as invalid property textbox21 needs to be textbox40 and textbox40 needs to be textbox21 and so on any ideas

      T Offline
      T Offline
      Tim Carmichael
      wrote on last edited by
      #2

      If I understand your question correctly, you are trying to change the name of a textbox to a name already in use. If that is the case, change your naming convention: instead of naming them 'textbox1' through 'textbox180', use something like 'txtbox1' through 'txtbox180'. Since these objects should not already exist, you won't have a problem. Tim

      1 Reply Last reply
      0
      • K kendo17

        i am trying to change the name of text boxes in vb.net as they are not in proper sequence 180 of them but it wont let me change name as invalid property textbox21 needs to be textbox40 and textbox40 needs to be textbox21 and so on any ideas

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        kendo17 wrote:

        180 of them

        Well, your basic problem is that your UI sucks.  Use a grid if you want a grid.  Don't use 180 text boxes if they don't represent a grid. The other problem is that your naming convention sucks, and that if you want to set the names of your controls, you should do it in the designer, or if you're dynamically creating them, you should put them where you want them in the first place.

        Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert

        1 Reply Last reply
        0
        • K kendo17

          i am trying to change the name of text boxes in vb.net as they are not in proper sequence 180 of them but it wont let me change name as invalid property textbox21 needs to be textbox40 and textbox40 needs to be textbox21 and so on any ideas

          M Offline
          M Offline
          mtone
          wrote on last edited by
          #4

          I would bet you would be better off doing something like using an image of the seating chart as the background of the Form and handling the click event of the form. Get the mouse corrodinates to deterime which seat was clicked. You would have to do some math so you know how big the x and y range is for each seat but I bet you could figure if each seat is 10 X 10 points, for example, and your mouse click was at x y you could find which seat was clicked. I have never done this but that would be the first thing I look at.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups