Results 1 to 2 of 2

Thread: VB6 - ImageListPicker Control

Threaded View

  1. #1

    Thread Starter
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    VB6 - ImageListPicker Control

    This is a simple GUI UserControl for "picking" from a list of pictures.

    Your program loads some pictures into it, then the user can scroll the visible list horizontally and click on one to select it.


    METHODS

    Add - Add a StdPicture to the list.

    Delete X - Delete picture X from the list. X from 1 to n.

    ClearAll - Clears the list.


    PROPERTIES

    ListItems(X) - Retrieves item X as a StdPicture object.

    ListIndex - Currently selected item, 0 = none selected.

    ThumbNailHeight, ThumbnailWidth - Visible size in pixels for the scrolling thumbnails.

    ThumbnailsMargin - Space between each thumbnail in pixels. Must be 3 or greater to allow room for the selection rectangle.


    EVENTS

    Click - Fired when user clicks on a thumbnail image.


    No special requirements or dependencies. Uses intrinsic VB6 controls and image operations. Just add the .CTL and .CTX files to your Project folder then add the control using Project|Add|File...

    Source provided in the attachment as part of a demo project, along with some sample pictures (which is why the attachment is so large).

    You could enhance it to add "tag" values, "file names" and so on. It would be easy enough to create a "vertical" version of this control too.
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by dilettante; Jan 6th, 2013 at 08:05 AM. Reason: Updated attachment: small bug in demo though not in ImageListPicker itself

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