Results 1 to 4 of 4

Thread: Dynamicly create a text box?

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    2

    Question

    I have created an ODBC connection, and need to create a button for each record. Any ideas??

    The amount of records varies drasticly form say 1 to 1000, so its not feasible to have buttons hidden.....

    Thanks in advance,
    --Don

  2. #2
    Hyperactive Member PJB's Avatar
    Join Date
    Aug 2000
    Location
    dunno at the moment
    Posts
    302
    just out of curiosity why do you need a button for every record?
    VB6.0 SP4
    Windows 2000
    I'm thinking of a number between

  3. #3
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    I agree with PJB there must a more efficient way of doing this without the need of 1000 buttons !!

    But if you want to know how to create buttons at runtime, here is how u can do this


    Code:
    'Make a control array of a command button 
    'eg set the Property "Index" of Command1 to 0
    'and paste the code
    
    Dim iCount As Integer
    Private Sub Command1_Click(Index As Integer)
    
    Load Command1(iCount)
    Command1(iCount).Visible = True
    Command1(iCount).Left = Command1(iCount - 1).Left + Command1(iCount - 1).Width
    iCount = iCount + 1
     
    End Sub
    
    Private Sub Form_Load()
    iCount = 1
    End Sub
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  4. #4

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    2

    Smile THANKS GENTLEMEN

    Thank you sirs this is what I needed :-)

    --Don

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width