in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Image in C1.Combo

Last post 10-25-2007 11:53 AM by C1_GregL. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-20-2007 2:30 PM

    Image in C1.Combo

    Hi all,

    how can I display an icon in the C1.combobox left beside the DisplayItem?

    Regards
       Marcel

  • 10-25-2007 11:53 AM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 500

    Re: Image in C1.Combo

    hi Marcel,

    This can be done using the FetchCellStyle method.  Example for Column(0)...

    C1Combo1.Splits(0).DisplayColumns(0).FetchStyle = True 

    Private Sub C1Combo1_FetchCellStyle(ByVal sender As System.Object, ByVal e As C1.Win.C1List.FetchCellStyleEventArgs) Handles C1Combo1.FetchCellStyle

      If e.Col = 0 Then
         e.CellStyle.ForeGroundPicturePosition = C1.Win.C1List.ForeGroundPicturePositionEnum.LeftOfText
         e.CellStyle.ForegroundImage = imgs.Images(e.Row)
      End If
    End Sub

    Here, imgs is an ImageList filled with the images. 

    Regards,
    Greg L

    Filed under: ,
Page 1 of 1 (2 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.