|
-
December 20th, 2002, 05:26 AM
#2
int nStart = X ;
int spos = 0 ;
int epos = this.Columns[0].Width ;
for ( int i=0; i < this.Columns.Count ; i++)
{
if ( nStart > spos && nStart < epos )
{
subItemSelected = i ;
break;
}
spos = epos ;
epos += this.Columns[i].Width;
}
Console.WriteLine("SUB ITEM SELECTED = " + li.SubItems[subItemSelected].Text);
subItemText = li.SubItems[subItemSelected].Text ;
this should give you the selected subitems
than you have to chenge the background
let me know if this help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|