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. dynamic textbox

dynamic textbox

Scheduled Pinned Locked Moved Visual Basic
helptutorialquestion
4 Posts 3 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.
  • M Offline
    M Offline
    moomoooomoo
    wrote on last edited by
    #1

    greetings again to you all, guyz, again i need your help very very badly. im successfull in creating textbox dynamically in the runtime.. but my problem now is how to get the data from the dynamic textbox... code: creating textbox in runtime While rd.Read text = New TextBox stForm.Controls.Add(text) text.Visible = True text.Name = "text" & CStr(xCnt) text.Location = New Point(122 + (3 * xPnt), 135) text.Size = New Size(60, 21) text.MaxLength = rd.Item(0) xCnt += 1 xPnt += 22 End While after the code above it will display a number of textbox in the form, next is i will input some data in the displayed textbox.... my problem is How to get the data from the display textbox which was done at runtime?..... your help is higly appreciated... links/codes is highly appreciated.. :-D

    start a new beginning in every ending; thats what life for......

    P P 2 Replies Last reply
    0
    • M moomoooomoo

      greetings again to you all, guyz, again i need your help very very badly. im successfull in creating textbox dynamically in the runtime.. but my problem now is how to get the data from the dynamic textbox... code: creating textbox in runtime While rd.Read text = New TextBox stForm.Controls.Add(text) text.Visible = True text.Name = "text" & CStr(xCnt) text.Location = New Point(122 + (3 * xPnt), 135) text.Size = New Size(60, 21) text.MaxLength = rd.Item(0) xCnt += 1 xPnt += 22 End While after the code above it will display a number of textbox in the form, next is i will input some data in the displayed textbox.... my problem is How to get the data from the display textbox which was done at runtime?..... your help is higly appreciated... links/codes is highly appreciated.. :-D

      start a new beginning in every ending; thats what life for......

      P Offline
      P Offline
      Paras Kaneriya
      wrote on last edited by
      #2

      may be you can access these textboxes like normal textboxes the only difference between the two is that one is putted at designtime and another at runtime

      Paras Kaneriya
      The difference between genius and stupidity is that genius has its limits.

      M 1 Reply Last reply
      0
      • P Paras Kaneriya

        may be you can access these textboxes like normal textboxes the only difference between the two is that one is putted at designtime and another at runtime

        Paras Kaneriya
        The difference between genius and stupidity is that genius has its limits.

        M Offline
        M Offline
        moomoooomoo
        wrote on last edited by
        #3

        tnx for the idea.. i already got the answer.... thank you... your help is very much appreciated...

        start a new beginning in every ending; thats what life for......

        1 Reply Last reply
        0
        • M moomoooomoo

          greetings again to you all, guyz, again i need your help very very badly. im successfull in creating textbox dynamically in the runtime.. but my problem now is how to get the data from the dynamic textbox... code: creating textbox in runtime While rd.Read text = New TextBox stForm.Controls.Add(text) text.Visible = True text.Name = "text" & CStr(xCnt) text.Location = New Point(122 + (3 * xPnt), 135) text.Size = New Size(60, 21) text.MaxLength = rd.Item(0) xCnt += 1 xPnt += 22 End While after the code above it will display a number of textbox in the form, next is i will input some data in the displayed textbox.... my problem is How to get the data from the display textbox which was done at runtime?..... your help is higly appreciated... links/codes is highly appreciated.. :-D

          start a new beginning in every ending; thats what life for......

          P Offline
          P Offline
          parth p
          wrote on last edited by
          #4

          moomoooomoo wrote:

          text.Name = "text" & CStr(xCnt)

          In this line you're already giving textbox a name and to get a data of that text box just use that name, it's simple. E.g. dim txtVal as string = textxCnt.text this should do it i guess...

          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