skip navigation
Telerik UI for WinForms
Product Bundles
DevCraft
All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
NEW
: Design Kits for Figma
Online Training
Document Processing Library
Embedded Reporting for web and desktop
Web
Kendo UI
UI for jQuery
UI for Angular
UI for React
UI for Vue
UI for Blazor
UI for ASP.NET Core
UI for ASP.NET MVC
UI for ASP.NET AJAX
Mobile
UI for .NET MAUI
UI for Xamarin
Document Management
Telerik Document Processing
Desktop
UI for .NET MAUI
UI for WinUI
UI for WinForms
UI for WPF
Reporting & Mocking
Telerik Reporting
Telerik Report Server
Telerik JustMock
Automated Testing
Test Studio
Test Studio Dev Edition
CMS
Sitefinity
UI/UX Tools
ThemeBuilder
Design System Kit
Debugging
Fiddler
Fiddler Everywhere
Fiddler Classic
Fiddler Jam
FiddlerCap
FiddlerCore
Free Tools
VB.NET to C# Converter
Testing Framework
View all products
Overview
Demos
Roadmap
What's New
Roadmap
Release History
Docs & Support
Support and Learning
Support and Learning Hub
First Steps
Docs
Demos
Virtual Classroom
Forums
Videos
Blogs
Accessibility and Security
Submit a Ticket
Productivity and Design Tools
Visual Studio Extensions
Visual Studio Templates
Embedded Reporting
Pricing
Shopping cart
Login
Contact Us
Try now
close mobile menu
Telerik Forums
/
UI for WinForms
This is a migrated thread and some comments may be shown as answers.
RadListBox with images
3 Answers
96 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Warren
Top achievements
Rank 1
Warren
asked on
28 Aug 2008,
04:13 PM
How do I add images to a radlistbox?
This is what I have so far:
Me
.RadListBox1.DisplayMember =
"LocationStatus"
Me
.RadListBox1.ValueMember =
"LocationStatusId"
Me
.RadListBox1.ImageList =
Me
.ImageList1
3 Answers
, 1 is accepted
Sort by
Score
Date
0
Angel
Telerik team
answered on
29 Aug 2008,
04:18 PM
Hello Warren,
You have to set either the
ImageIndex
or
ImageKey
property for each item in the listbox. This is done through the property grid.
Let us know if you had something different in mind.
Sincerely yours,
Angel
the Telerik team
Check out
Telerik Trainer
, the state of the art learning tool for Telerik products.
0
Warren
Top achievements
Rank 1
answered on
29 Aug 2008,
04:35 PM
I'm setting my datasource during runtime
Me.RadListBox1.DataSource = OTS.GetLocationStatus(True)
How do I set the ImageIndex or ImageKey in code?
0
Angel
Telerik team
answered on
01 Sep 2008,
04:17 PM
Hi Warren,
Here is a sample code that sets the first image from the image list to every even item, while the second image is set to the odd items:
Dim i As
Integer
=
0
Do While i
<
Me.RadListBox1.Items.Count
Dim item As
RadListBoxItem
=
CType
(Me.RadListBox1.Items(i), RadListBoxItem)
If (i Mod 2) = 0 Then
item.ImageIndex
=
0
Else
item.ImageIndex
=
1
End If
i += 1
Loop
You may also consider the
TextImageRelation
,
TextAlignment
and
ImageAlignment
properties of RadListBoxItem.
Greetings,
Angel
the Telerik team
Check out
Telerik Trainer
, the state of the art learning tool for Telerik products.
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
Warren
Top achievements
Rank 1
Answers by
Angel
Telerik team
Warren
Top achievements
Rank 1
Share this question
or
Copy link