+ Reply to Thread
Results 1 to 5 of 5

Shapes into List Box

  1. #1
    ZipCurs
    Guest

    Shapes into List Box

    I am using a List Box to control what shows up on a graph I have created and
    it works. I use the List Box as the legend for the graph and have tried to
    place the appropriate colored shapes next to each line item. These do not
    seem to want to line up very easily. It seems to me that a better solution
    would be to put the colored shape with the text in the List Box. Is this
    possible? If so, some guidance would be greatly appreciated.

  2. #2
    Jim Thomlinson
    Guest

    RE: Shapes into List Box

    List boxes only hold Text, so no I am affraid you are left to your own
    devices on this one...
    --
    HTH...

    Jim Thomlinson


    "ZipCurs" wrote:

    > I am using a List Box to control what shows up on a graph I have created and
    > it works. I use the List Box as the legend for the graph and have tried to
    > place the appropriate colored shapes next to each line item. These do not
    > seem to want to line up very easily. It seems to me that a better solution
    > would be to put the colored shape with the text in the List Box. Is this
    > possible? If so, some guidance would be greatly appreciated.


  3. #3
    Nile_Hef
    Guest

    RE: Shapes into List Box


    Rather than drag-and-dropping an MSForms Listbox off the 'Tools' menu, click
    the 'More Controls...' button and fetch two controls: a Microsoft ListView
    6.0 control and an ImageList. You'll need C:\WINNT\system32\comctl32.ocx

    The imageList can store small bitmaps and icons; the Listview control can
    reference an ImageList and display icons alongside each entry. This needs
    some VBA coding, to associate the correct ison with the correct line, but
    it's a standard ActiveX interface.

    Nile

  4. #4
    ZipCurs
    Guest

    RE: Shapes into List Box

    Thanks for the suggestion, will try when time permits. Does the ListView
    behave like a ListBox, allowing multiple items to be selected? Can items be
    put into the ImageList from within the worksheet? All I am trying to do is
    create an interactive graph legend.

    "Nile_Hef" wrote:

    >
    > Rather than drag-and-dropping an MSForms Listbox off the 'Tools' menu, click
    > the 'More Controls...' button and fetch two controls: a Microsoft ListView
    > 6.0 control and an ImageList. You'll need C:\WINNT\system32\comctl32.ocx
    >
    > The imageList can store small bitmaps and icons; the Listview control can
    > reference an ImageList and display icons alongside each entry. This needs
    > some VBA coding, to associate the correct ison with the correct line, but
    > it's a standard ActiveX interface.
    >
    > Nile


  5. #5
    Nile_Hef
    Guest

    RE: Shapes into List Box

    > Does the ListView behave like a ListBox, allowing multiple items to be
    selected?

    Yes. An MS-Forms listbox is a cut-down Listview


    > Can items be put into the ImageList from within the worksheet?


    I'm not so sure; I've always loaded up the ImageList with the graphics I
    want at design time. However, it may be possible to load the binary data from
    a COM control's .Image or .Picture property at runtime.

    Let me guess: you want a set of 16x16 icons representing all the possible
    line formats you will use in the chart...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1