Change full row select back colour or list view - Printable Version +- BP Forums (https://bpforums.info) +-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55) +--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56) +---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8) +----- Forum: Programming Help (https://bpforums.info/forumdisplay.php?fid=9) +----- Thread: Change full row select back colour or list view (/showthread.php?tid=536) |
Change full row select back colour or list view - Bradley - 05-21-2012 Hi Team Of Programmers, I need your help of a problem that is frustrating me I have a list view box and I want to change to full row select back colour I have already achieved this for list box but the settings are different this is what I am wanting to do for list view any help will be gratefully taken on board Code Code: Private Sub listBox1_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles ListBox1.DrawItem Kind Regards Bradley Re: Change full row select back colour or list view - brandonio21 - 05-21-2012 Hm, well, looking at your existing code.. I don't really know what you're doing. Sorry about that. So, I wrote my own method which should do what you intended. I don't know if it's what you wanted, but you can take a look at it. Code: 'This method colors all of the list view items according to the following data Pastebin version: <!-- m --><a class="postlink" href="http://pastebin.com/jhmyty3t">http://pastebin.com/jhmyty3t</a><!-- m --> Just call this method every time the SelectedIndex is changed on the ListView control. Re: Change full row select back colour or list view - Bradley - 05-23-2012 brandonio21, Once again many thanks for you code and efforts and it is much appreciated this was not originally what I was after but I used to my advantage and adapted my idea thanks for the code I have added this to the project and the list of codes to my collection for future reference Kind Regards Bradley Re: Change full row select back colour or list view - brandonio21 - 05-23-2012 Fantastic! I am glad that I could help! |