Results 1 to 4 of 4

Thread: Which item selected in imagecombo ? *[RESOLVED]*

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Simon Caiger's Avatar
    Join Date
    Aug 2000
    Location
    Rugby, England
    Posts
    377

    Which item selected in imagecombo ? *[RESOLVED]*

    How do I tell which image the user has selected in an imagecombo control in which there are just images (no text)

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Load()
    4.  
    5.     Dim sColourArray(9) As String, i As Integer
    6.    
    7.     sColourArray(0) = vbBlue
    8.     sColourArray(1) = vbRed
    9.     sColourArray(2) = vbGreen
    10.     sColourArray(3) = vbYellow
    11.     sColourArray(4) = vbBlack
    12.     sColourArray(5) = vbWhite
    13.     sColourArray(6) = vbCyan
    14.     sColourArray(7) = vbMagenta
    15.     sColourArray(8) = vbButtonFace
    16.     sColourArray(8) = vbHighlight
    17.     sColourArray(9) = vbInfoBackground
    18.    
    19.     For i = 0 To 9
    20.         picPicBox.BackColor = sColourArray(i)
    21.         ilsImageList.ListImages.Add , , picPicBox.Image
    22.        
    23.         icmbColourCombo.ComboItems.Add , , , i + 1
    24.     Next
    25.  
    26. End Sub
    27.  
    28. Private Sub icmbColourCombo_Click()
    29.  
    30.     'What goes here ?
    31.  
    32. End Sub
    Last edited by Simon Caiger; Nov 19th, 2002 at 05:07 AM.
    Simon Caiger

    Documentation is like sex; when it's good, it's very, very good, and when it's bad, it's better than nothing.

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