473,698 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ListBox...image dynamically

JJ

I am populating a listbox with Items dynamically during run time. That is
fine!!!. How can I add an image to (just one standard) to each item in the
list box dynamically.

Thnaks
JJ
Nov 17 '05 #1
2 3066
Hi JJ,

I believe you need to ownerdraw the ListBox and draw the image manually in the DrawItem event.
On Thu, 19 May 2005 17:15:40 +0200, JJ <JJ@hotmail.com > wrote:

I am populating a listbox with Items dynamically during run time. That is
fine!!!. How can I add an image to (just one standard) to each item in the
list box dynamically.

Thnaks
JJ


--
Happy coding!
Morten Wennevik [C# MVP]
Nov 17 '05 #2
Hi,

There is a very good example of how to do it in www.opennetcf.org

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Morten Wennevik" <Mo************ @hotmail.com> wrote in message
news:op.sq05ob0 bklbvpo@stone.. .
Hi JJ,

I believe you need to ownerdraw the ListBox and draw the image manually in
the DrawItem event.
On Thu, 19 May 2005 17:15:40 +0200, JJ <JJ@hotmail.com > wrote:

I am populating a listbox with Items dynamically during run time. That is
fine!!!. How can I add an image to (just one standard) to each item in
the
list box dynamically.

Thnaks
JJ


--
Happy coding!
Morten Wennevik [C# MVP]

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3235
by: Petrus | last post by:
Hi, I can't seem to figure out how to dynamically add new items with different font colors to a listbox. I have followed the ColorListBox example at http://www.codeproject.com/cs/combobox/colorlistbox.asp which i found very informative. But in the example all the items that should be added to the listbox is known when the form is loaded. What I want to do is add lines (items) to the listbox dynamically trough the application - for...
1
3348
by: mlarson | last post by:
Hello, I'm working on a page that dynamically creates listboxes and the "options" that are added to the listbox. A user can then click on buttons to either add or delete the "options" from one listbox to the other. All of this works fine, but when the user changes from one page to the next, I'm trying to save all user input before it redirects to the next page. For some reason, I can't see what values have been selected in one of the...
2
3028
by: Limin | last post by:
I add some picturebox in the listbox as controls like following. Dim myPic as PictureBox 'Init myPic from here '... '... for i=0 to 30 'New picturebox '... 'set mypic property '....
1
5110
by: Kits | last post by:
Hi, Is it possible to put a background image in a listBox control?? How can this be done? Specifically I would like to display an image in the are of a listbox which is not occuppied by any listbox items (alternatively if I could get rid of this region altogether or make it transparent.. just thinking..) Can anyone help??? Thanks in advance Kits
1
2063
by: rege | last post by:
Hi, Is it possible to put a background image in a listBox control?? How can this be done? Specifically I would like to display an image in the are of a listbox which is not occuppied by any listbox items (alternatively if I could get rid of this region altogether or make it transparent.. just thinking..) Can anyone help??? Thanks in advance Kits
1
3417
by: stimul8d | last post by:
okay; ASP. I have i listbox inside a user control which is dynamically created on page_init. I check for postback and only populate the datasource if it's false. regardless, i do this foreach (Product p in manager.Products) { ASP.MasterDetailDropDown productMasterDetail; productMasterDetail = (ASP.MasterDetailDropDown)LoadControl("~/controls/MasterDetailDropDown.ascx"); ...
6
7207
by: GS | last post by:
how can I set tooTip on ToolTip1 for a listbox?
2
4402
by: erbear | last post by:
Hi all, I am new to VB, and I am having some troubles. I have a listbox that when you click on the item it displays a picture in a picture box and a message in a label. It works fine when an item is manually selected, but I want forward and back buttons that will do this. It works once but it doesn't highlight the new item in the listbox, so it gets stuck. I can't use a loop either. Any help is greatly appreciated. See code below: ...
0
8671
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8598
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9016
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8856
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4613
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.