P
Patrick De Ridder
Below a rather simplistic example of a list view routine.
Say I want to have "over" appearing in red on the
display, how would I do that?
Many thanks,
Patrick.
(e-mail address removed)
***************************
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
\namespace WindowsApplication1
{
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region
#endregion
static void Main()
{
Application.Run(new Form1());
}
private void Form1_Load(object sender, System.EventArgs e)
{
string [] content = new string [4];
string [] show = new string [2];
content [0] = "the cat";
content[1] = "jumped ";
content [2] = "over";
content[3] = "the wall";
int k = -1;
for (int i=0 ;i<2;i++)
{
show [0] = content[++k];
show[1] = content [++k];
ListViewItem list = new ListViewItem(show);
listView1.Items.Add(list);
}
}
}
}
Say I want to have "over" appearing in red on the
display, how would I do that?
Many thanks,
Patrick.
(e-mail address removed)
***************************
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
\namespace WindowsApplication1
{
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region
#endregion
static void Main()
{
Application.Run(new Form1());
}
private void Form1_Load(object sender, System.EventArgs e)
{
string [] content = new string [4];
string [] show = new string [2];
content [0] = "the cat";
content[1] = "jumped ";
content [2] = "over";
content[3] = "the wall";
int k = -1;
for (int i=0 ;i<2;i++)
{
show [0] = content[++k];
show[1] = content [++k];
ListViewItem list = new ListViewItem(show);
listView1.Items.Add(list);
}
}
}
}