hi,
I wanna to highlight the entire item as well as image after the selection.How to achive this?Can we modify the default behaviour of ultralist so that only icon is not highlighted?
regards,
ravi.
HI Ravi,
You can make use of the UltraListBar ItemSelected Event. The ItemEventArgs e exposes the selected Item object. You can then get acces to the
e.Item. Appearance object. where you can change ForeColor, ImageBackGround and many other properties.
Here are somea help links to the UltraListBar.
http://help.infragistics.com/Help/NetAdvantage/NET/2007.3/CLR2.0/html/Infragistics2.Win.UltraWinListBar.v7.3~Infragistics.Win.UltraWinListBar.Item~Appearance.html
http://help.infragistics.com/Help/NetAdvantage/NET/2007.3/CLR2.0/html/Infragistics2.Win.v7.3~Infragistics.Win.AppearanceBase.html
http://help.infragistics.com/Help/NetAdvantage/NET/2007.3/CLR2.0/html/Infragistics2.Win.v7.3~Infragistics.Win.AppearanceBase_members.html
http://help.infragistics.com/Help/NetAdvantage/NET/2007.3/CLR2.0/html/WinListBar_API_Overview.html
http://help.infragistics.com/Help/NetAdvantage/NET/2007.3/CLR2.0/html/WinListbar.html
here is a code snippet:
private void ultraListBar1_ItemSelected(object sender, Infragistics.Win.UltraWinListBar.ItemEventArgs e) { e.Item.Appearance.BackColor = Color.Red;
e.Item.Appearance.ImageBackground = Icon.ToBitmap(); e.Item.Appearance.ImageBackgroundOrigin = Infragistics.Win.ImageBackgroundOrigin.Form; e.Item.Appearance.ImageBackgroundStyle = Infragistics.Win.ImageBackgroundStyle.Stretched; e.Item.Appearance.ImageBackgroundAlpha = Infragistics.Win.Alpha.UseAlphaLevel; e.Item.Appearance.AlphaLevel = 200; e.Item.Appearance.ForeColor = Color.Yellow; }