473,890 Members | 3,926 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ownerdraw icon in listbox

Hi
I have this list box with 2 columns.
In column 1 I want to but an Icon to represent a person name in column 2
Because, I want to to have the listview selection color different from the
system color, I have to go ownerdrawn
But I cannot see how to draw the individual icons in col 1
The following code adds the icon from the imagelist and the text. I can draw
the text, but I cannot draw the icons in col1.

So, using ListViewItem1_D rawItem

Code:

ListViewItem1.S mallImageList = ImageList1

Dim myItems As New ListViewItem("" , 0)
ListViewItem1.I tems.Add(myItem s)
ListViewItem1.S ubItems.Add(som etext)
ListViewItem1.S ubItems.Add(som etext)

Any suggestions
Thanks

Oct 4 '08 #1
0 1269

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

Similar topics

4
1769
by: Bernie Yaeger | last post by:
I now know how to gather the file type icons and I'm able to use them in a listview. But a listbox does not have a .smallimagelist or .largeimagelist member, so I don't know how to translate that so that I have the icon + the string in a listbox. Is this possible, and if so, can you give me some idea how to go about it. Thanks for any help. Bernie Yaeger
2
3052
by: Sean | last post by:
Hi all, I have few OwnerDraw TabPage icons. The problem that I am having now is that when another window go over the icons, they don't redraw properly (meaning you either cannot see the icon at all or the icon is drawn only half). Does anyone know how to fix this? Any suggestion/help will be greatly appreciated. Thank you very much in advance.
2
1744
by: jm | last post by:
There are properties for OwnerDraw on ContextMenu items. I know it can be done with regular menus. I cannot find anyone doing it with the systray icon contextmenu (notifyicon.) Is it possible to change fonts, colors, etc. of a context menu item if it is a system tray contextmenu? Thank you.
1
2044
by: Christopher | last post by:
Hi... I would be very grateful If You could resolve my question, my question is "How do tabular a ListBox that their property DrawMode is OwnerDrawFixe?". I do know as tabular a listbox, but I don't know is as tabular a listbox in the which its DrawMode Property is OwnerDrawFixed. I thank their help.
0
999
by: Michel | last post by:
I come back with a new question regarding my OwnerDraw menu. That is a classical ownerDraw menu to add icon and some other color properties. My feature is to color all the menu bar with the background color of the items. So I feel the left side of the menu bar with a FillRectangle. I gather the width of the form for the Rectangle definition Everything works well.
2
1275
by: Peter Proost | last post by:
Hi group, I've got this ownerdraw menu module which I got from a site and modified to my personal needs, but the only problem I'm having is with the lines in a menu, when you type - as text, it normaly becomes a full line and the height of the menuitem is reduced but when you set a menu to ownerdraw and use my draw and measure item handlers this doesn't work anymore, has anyone worked out a good sloution for this before? Greetz Peter
2
1349
by: Peter Proost | last post by:
Hi, I've got the following ownerdraw menu: drag a mainmenu on a form and add some menuitems to it, set all the menuitems to ownerdraw = true and for every menuitem add this code (replace nothing with an ico if you want to show an icon in the menu) also add a module and copy paste the code at the bottom of the message. Private Sub MenuItem1_DrawItem1(ByVal sender As Object, ByVal e As _
2
1433
by: Rlrcstr | last post by:
I'm rolling my own with a listbox. The items in the list box are of varying sizes and I'm hit checking when the litbox is checked to see what portion of an item the user has clicked on. Mostly it works fine. The only issue I'm running into is when the item that th users clicks is at the bottom of the listbox and is not completely displayed. When the user clicks there the listbox autoscrolls the full item into view. That would be...
0
1476
by: =?Utf-8?B?QnJpYW4gS2l0dA==?= | last post by:
I wrote a class that inherits ComboBox to create a dropdown that contains both an image and a text description. This is for an IE browser toolbar. I use the OwnerDrawFixed method to do this. The first time click the arrow for the drop down, and shows an empty dropdown, and immediately closes it. The second time I click the arrow, it works perfectly. It does this same behavior on Vista, XP, IE6 and IE7. I'm stumped, I'm sure there...
0
10827
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...
1
10924
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9637
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...
1
8017
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7170
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6049
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4681
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
2
4275
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3281
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.