ListView item highlighting
-
I'm curious as to whether or not I'd be able to do the following things to list view items: #1 - Make it so that even when the list view does not have focus, a selected item shows up with the dark blue background color. If you set ListView.HideSelection = false, a selected item without focus will have a grey background, which unfortunately, I haven't been able to figure out how to change. #2 - Allow selected ListView items to fully select the row. This is not ListView.FullRowSelect, but rather what I mean is... say I have the item "Item1" in the ListView, yet the ListView is wider than that text, the highlighted portion will only cover that text, but will not cover the entire row. Thanks.
-
I'm curious as to whether or not I'd be able to do the following things to list view items: #1 - Make it so that even when the list view does not have focus, a selected item shows up with the dark blue background color. If you set ListView.HideSelection = false, a selected item without focus will have a grey background, which unfortunately, I haven't been able to figure out how to change. #2 - Allow selected ListView items to fully select the row. This is not ListView.FullRowSelect, but rather what I mean is... say I have the item "Item1" in the ListView, yet the ListView is wider than that text, the highlighted portion will only cover that text, but will not cover the entire row. Thanks.
-
I'm curious as to whether or not I'd be able to do the following things to list view items: #1 - Make it so that even when the list view does not have focus, a selected item shows up with the dark blue background color. If you set ListView.HideSelection = false, a selected item without focus will have a grey background, which unfortunately, I haven't been able to figure out how to change. #2 - Allow selected ListView items to fully select the row. This is not ListView.FullRowSelect, but rather what I mean is... say I have the item "Item1" in the ListView, yet the ListView is wider than that text, the highlighted portion will only cover that text, but will not cover the entire row. Thanks.
Ok here you are going outside the design limitations of the control you are using. You have 2 basic choices, find an alternative control that meets your requirements (Infragistics and DevExpress are 2 suppliers) or create your own control. 1. The background colour of the selected item is probably managed by the skin/style windows is using. 2. You are asking it to paint the listviews backgound area according to a control (item) that is not there. As Eric said expand the last subitem to the full width, except then you need to deal with the horizontal scroll bar.
Never underestimate the power of human stupidity RAH
-
Ok here you are going outside the design limitations of the control you are using. You have 2 basic choices, find an alternative control that meets your requirements (Infragistics and DevExpress are 2 suppliers) or create your own control. 1. The background colour of the selected item is probably managed by the skin/style windows is using. 2. You are asking it to paint the listviews backgound area according to a control (item) that is not there. As Eric said expand the last subitem to the full width, except then you need to deal with the horizontal scroll bar.
Never underestimate the power of human stupidity RAH