Results 1 to 10 of 10

Thread: ListBox UserControl

  1. #1

    Thread Starter
    Hyperactive Member MikeBAM's Avatar
    Join Date
    Sep 2000
    Location
    Metro Detroit
    Posts
    284

    ListBox UserControl

    How can I make my own listBox control? I want to make a listBox control and add unlimited items to it.
    ~* )v( ! /< E *~

  2. #2
    champgary
    Guest
    Hey..
    when you start the new project select
    ActiveXControl ,
    Draw list box, add code ,
    Is this you want,
    or what else??
    Gary

  3. #3
    Fanatic Member Slaine's Avatar
    Join Date
    Jul 2002
    Posts
    641
    Unfortunatly champgary suggestion would have the same constraints and limits that the standard Listbox would have.

    One would need to use the API within the activeX control in order to user draw the listbox, as well as holding the entries in a structure that could cope with an unlimited number of items.

    Not a trivial task but certainly not impossible. In fact it would be a nice little project for learning about ActiveX controls and the API. It could also be a useful addition to the standard control set, especially if additional functionality was added.
    Martin J Wallace (Slaine)

  4. #4

  5. #5
    Frenzied Member TomGibbons's Avatar
    Join Date
    Feb 2002
    Location
    San Diego, CA Previous Location: UK
    Posts
    1,345
    For anyone who wants to create their own ActiveX control, VB World has a great
    tutorial for people who have never done this before:
    http://www.vb-world.net/activex/controls/

  6. #6

    Thread Starter
    Hyperactive Member MikeBAM's Avatar
    Join Date
    Sep 2000
    Location
    Metro Detroit
    Posts
    284
    thanks Wokawidget. But that's gunna take a while to get it down to just the list box out of that code.
    ~* )v( ! /< E *~

  7. #7
    Frenzied Member moinkhan's Avatar
    Join Date
    Jun 2000
    Location
    Karachi, Pakistan
    Posts
    2,011
    But... no matter what approach he uses. he'll have to put the items of the listbox in an array (or collection) and everyone knows that array or collection use indexes which are of type Integer.. .so would it be possible to store unlimited items?? as the integer limit isn +ve is 32767..
    What do you ppl think????

  8. #8
    Fanatic Member Slaine's Avatar
    Join Date
    Jul 2002
    Posts
    641
    There is always going to be some limit, even if it is just physical RAM. But it should be possible to dynamically create additional arrays/collections as the dataset grows - but this would need some hefty code to manage.
    Martin J Wallace (Slaine)

  9. #9
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Talking Still crap, still tired, still hungover...ASPRIN!

    The INDEX of a collection is a long...
    That means you can store up to 2 billion entries
    Is that enough, or is that limited?

  10. #10

    Thread Starter
    Hyperactive Member MikeBAM's Avatar
    Join Date
    Sep 2000
    Location
    Metro Detroit
    Posts
    284

    Talking

    2 billion is good
    ~* )v( ! /< E *~

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