Hello,
Changing backcolor/forecolor properties of individual items/subitems is not
supported in the .NET Compact Framework v1.0. But ListView itself allows
changing its backcolor and forecolor properties. Here is a sample that
shows how to do it:
public class Form1 : System.Windows.Forms.Form
{
private ListView listView;
public Form1()
{
InitializeComponent();
this.listView = new ListView();
this.listView.BackColor = Color.Green;
this.listView.ForeColor = Color.White;
this.listView.Items.Add(new ListViewItem("Item1"));
this.Controls.Add(this.listView);
}
private void InitializeComponent()
{
this.MinimizeBox = false;
this.Text = "Form1";
}
static void Main()
{
Application.Run(new Form1());
}
}
Best regards,
Sergiy.
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Thread-Topic: backcolor listview
| thread-index: AcQsYi3gGwdYhFTxQuiCEwaWZFKP0Q==
| X-WN-Post: microsoft.public.dotnet.framework.compactframework
| From: "=?Utf-8?B?amJwYg==?=" <
[email protected]>
| Subject: backcolor listview
| Date: Tue, 27 Apr 2004 07:16:06 -0700
| Lines: 3
| Message-ID: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa10.phx.gbl
| Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.compactframework:51838
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| I am trying to change the backcolor property on a listview control
subitem. I believe I installed SP2 correctly. Help!
|