Click here to Skip to main content
15,918,168 members
Home / Discussions / C#
   

C#

 
GeneralRe: Question about Mutex Pin
Andy Brummer30-Aug-05 10:30
sitebuilderAndy Brummer30-Aug-05 10:30 
GeneralRe: Question about Mutex Pin
Alex Cutovoi30-Aug-05 14:17
Alex Cutovoi30-Aug-05 14:17 
GeneralRe: Question about Mutex Pin
Andy Brummer30-Aug-05 19:30
sitebuilderAndy Brummer30-Aug-05 19:30 
GeneralRe: Question about Mutex Pin
Alex Cutovoi31-Aug-05 2:53
Alex Cutovoi31-Aug-05 2:53 
GeneralRe: Question about Mutex Pin
Alex Cutovoi31-Aug-05 2:56
Alex Cutovoi31-Aug-05 2:56 
QuestionMDI Child with flicker Pin
enricrt30-Aug-05 5:15
enricrt30-Aug-05 5:15 
QuestionListView with column and images Pin
Sasuko30-Aug-05 4:36
Sasuko30-Aug-05 4:36 
AnswerRe: ListView with column and images Pin
Luis Alonso Ramos30-Aug-05 6:43
Luis Alonso Ramos30-Aug-05 6:43 
First you need to add three columns to the ListView's Columns collection, either with the designer or by code:
ColumnHeader ch = new ColumnHeader();
ch.Text = "";
ch.Width = 35;
listView1.Columns.Add(ch);
 
ch = new ColumnHeader();
ch.Text = "Size";
ch.Width = 80;
listView1.Columns.Add(ch);
 
// and so on...
You then need to create an ImageList and add all the 16x16 images that could be displayed (while in detail view 16x16 pixel images are displayed), and then set the image list to the ListView control:
ImageList il = new ImageList();
il.Images.Add(bm1);  // bm1 and bm2 are objects of type Bitmap, maybe
il.Images.Add(bm2);  // from thumbnails created from the files you are listing
 
listVie1.SmallImageList = il;  // small if for 16x16 images displayed in detail view
Finally you add the items:
ListViewItem item = new ListViewItem("");  // No text on first column, only the image
item.ImageIndex = 0;  // or whatever index into the image list
item.SubItems.Add(String.Format("{0}x{1}", widht, height);
item.SubItems.Add(fullPath);
listView1.Items.Add(item);
 
// and so on for other items
I hope this helps. Any questions feel free to ask again.

-- LuisR



Luis Alonso Ramos
Intelectix - Chihuahua, Mexico

Not much here: My CP Blog!


The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
GeneralRe: ListView with column and images Pin
Sasuko30-Aug-05 7:56
Sasuko30-Aug-05 7:56 
GeneralRe: ListView with column and images Pin
Luis Alonso Ramos30-Aug-05 8:22
Luis Alonso Ramos30-Aug-05 8:22 
QuestionImage dislaying and processing in C# Pin
silka_c#30-Aug-05 4:21
silka_c#30-Aug-05 4:21 
AnswerRe: Image dislaying and processing in C# Pin
Andrew Kirillov30-Aug-05 4:59
Andrew Kirillov30-Aug-05 4:59 
QuestionRe: Image dislaying and processing in C# Pin
silka_c#31-Aug-05 0:50
silka_c#31-Aug-05 0:50 
Answer[Message Deleted] Pin
Judah Gabriel Himango30-Aug-05 5:01
sponsorJudah Gabriel Himango30-Aug-05 5:01 
AnswerRe: Image dislaying and processing in C# Pin
HumanOsc30-Aug-05 7:33
HumanOsc30-Aug-05 7:33 
QuestionJava Pin
VickyC#30-Aug-05 4:02
VickyC#30-Aug-05 4:02 
AnswerRe: Java Pin
Judah Gabriel Himango30-Aug-05 4:47
sponsorJudah Gabriel Himango30-Aug-05 4:47 
GeneralRe: Java Pin
VickyC#30-Aug-05 4:51
VickyC#30-Aug-05 4:51 
Questionadding a Palette to a Surface in DirectX Pin
silka_c#30-Aug-05 3:28
silka_c#30-Aug-05 3:28 
Questionsql connection string c# by coding Pin
bozoo30-Aug-05 2:23
bozoo30-Aug-05 2:23 
AnswerRe: sql connection string c# by coding Pin
Guffa30-Aug-05 2:34
Guffa30-Aug-05 2:34 
AnswerRe: sql connection string c# by coding Pin
jan larsen30-Aug-05 2:41
jan larsen30-Aug-05 2:41 
GeneralRe: sql connection string c# by coding Pin
bozoo30-Aug-05 20:34
bozoo30-Aug-05 20:34 
QuestionApplication versioning Pin
rmedo30-Aug-05 1:58
rmedo30-Aug-05 1:58 
QuestionInterfaces & Protected Methods Pin
phimix30-Aug-05 1:19
phimix30-Aug-05 1:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.