Prev: Print Dialog Box
Next: Running Sum (opposite)
From: franc sutherland on 7 Apr 2010 19:30 Is it possible to determine the text and background color for selected items in a listbox, as it is with the unselected items? If you veer away from the black on white, you can end up with some pretty unreadable yellow on brown. I saw that this question have been posted in 2006, and was replied to in the negative. I was wondering if this had changed? Many thanks, Franc.
From: Marshall Barton on 8 Apr 2010 11:02 franc sutherland wrote: >Is it possible to determine the text and background color for selected >items in a listbox, as it is with the unselected items? If you veer >away from the black on white, you can end up with some pretty >unreadable yellow on brown. >I saw that this question have been posted in 2006, and was replied to >in the negative. I was wondering if this had changed? AFAIK, it hasn't changed. You can figure out what the highlighted rows' colors will be by taking the complement (change all the 1s to 0s and 0s to 1s) of the RGB value. This can be calculated in VBA by using a statement like: Me.List0.BackColor = Me.List0.ForeColor Xor &HFFFFFF Unfortunatly, that doesn't mean much to the human eye unless you stick with very basic colors. Eg. the complement of blue is yellow, red is cyan, green is pink, etc. Black and white start to make a lot more sense with this very limited highlighting rule, but if you choose a backcolor that is the complement of the forecolor some other combinations can look acceptable.. -- Marsh
|
Pages: 1 Prev: Print Dialog Box Next: Running Sum (opposite) |