color / listview


Author
Message
Mimouni Mohamed
Mimouni Mohamed
StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)
Group: StrataFrame Users
Posts: 5, Visits: 50
Hello,

How to display a color in the second column of a listview in the event RowPopulating

cordially
Mohamed Mimouni

StrataFrame Team
S
StrataFrame Developer (3K reputation)StrataFrame Developer (3K reputation)StrataFrame Developer (3K reputation)StrataFrame Developer (3K reputation)StrataFrame Developer (3K reputation)StrataFrame Developer (3K reputation)StrataFrame Developer (3K reputation)StrataFrame Developer (3K reputation)StrataFrame Developer (3K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
The MicroFour.StrataFrame.UI.Windows.Forms.ListView does not support changing the background color of a single column by default.  We use standard System.Windows.Forms.ListViewItems for that list view, and the only way to change the background color on a column would be to implement OWNER_DRAW on the list view, which is a very involved process.

The MicroFour.StrataFrame.UI.Windows.Forms.StrataListView DOES support background colors on each of the individual sub-items (cells) in the list view.  It does not, however, have the same ListPopulationSettings as the standard ListView, so you would need to populate the list with the StrataListViewItems manually.  While you are building the list, you would set the background color on the column like this:

if (condition)
{
   strataListItem.SubItems[3].BackgroundColor = Color.Red;
}
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search