Results 1 to 2 of 2

Thread: Dynamically add button controls

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Norwich, UK
    Posts
    405

    Dynamically add button controls

    I am writing an app that will need to dynamically generate a label and two buttons for every rows it pulls out of a database.

    so if there are 3 rows i need to generate

    label button button
    label button button
    label button button

    i've never done this before and i don't know a) how to dynamically generate the controls, and b) how to hook up events.

    can someone tell me how, or point me in the direction of a tutorial?

  2. #2
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949

    Re: Dynamically add button controls

    Hi,

    Always do a forum search before posting a query. Most wquestions have been covered.

    As a start look in the codebank at

    http://www.vbforums.com/showthread.php?t=328100

    where you will find what you want in the middle of the code (which dynamically creates texboxes and handlers.

    Best of luck.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

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