Results 1 to 4 of 4

Thread: creating a "continuous" form - like in access?

  1. #1

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    creating a "continuous" form - like in access?

    I am in need of a type of continuous form, like in access. Form will start out with a row of controls (textbox <-Item, multiline<-Description , textbox <-qty, textbox<- price, textbox <-total) some could wind up being labels, but that doesnt matter.

    I know how to create new controls, and attach events etc.... but is there something that will auto expand with a scrollbar?


    now as i type this... why do i have a feeling that a form itself will do this. lol......

    thnx
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: creating a "continuous" form - like in access?

    You probably want to look at the DataRepeater control, which is part of the VB PowerPacks and has been in the Toolbox by default since VS 2008 SP1.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: creating a "continuous" form - like in access?

    Another point you might consider is that there really isn't such a thing as a continuous form. All that the computer draws is what is displayed on the screen. It isn't going to waste time writing to areas that aren't visible. Therefore, I have created a few controls that act like horizontally or vertically scrolling displays by putting a scrollbar on a panel, then adding a couple other controls. For instance, I made a horizontally scrolling series of images by putting four pictureboxes side by side on a panel, and putting a scrollbar at the bottom of the panel. I then had a list of images. Based on the position of the scrollbar, I filled the four pictureboxes from the list. Therefore, if the scrollbar value was 0, the images would be 0, 1, 2, and 3. If the scrollbar was 5, then the images would be 5, 6, 7, and 8. Whenever the scrollbar changed I'd re-fill the pictureboxes. Also, the maximum of the scrollbar was based on the number of images in the list. The result looks and acts the way you would expect it to, but there are not a bunch of arbitrarily created controls. In fact, there are only six controls: Four picture boxes, one panel, and one scrollbar. Those were added at design time, and no adding of handlers is needed.

    The same kind of technique can be used for whatever you need to do, and is essentially how controls such as Listboxes actually work. In fact, the first time I wrote one of these was to add a listbox to a Windows CE program for a PDA, since Windows CE lacked a Listbox control and I needed a Listbox.
    My usual boring signature: Nothing

  4. #4

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: creating a "continuous" form - like in access?

    hmmm... for for thought. thank you
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

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