LISTBOX FORECOLOR (OpenInsight 32-Bit)
At 02 AUG 2005 06:24:40AM Paul Evans wrote:
I want to be able to set the font color on specific lines within a LISTBOX rather than the whole LISTBOX. How can I do this?
I have seen reference to calling Win GDI to do this but no examples.
How is it done?
At 02 AUG 2005 07:35AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Paul,
You can't easily do this in an OI Listbox (you'd have to subclass the control and handle the text drawing yourself - not a small undertaking :)
Other options you have are:
1) Use a single column EditTable with the COLOR_BY_POS message
2) Use an OLE ListBox control that exposes the functionality you need
World leaders in all things RevSoft
At 02 AUG 2005 09:36AM Paul Evans wrote:
Using Send_Message, I can only seem to colour an entire column. I just cannot get an entire row coloured. What am I doing wrong?
I can get an OLE table displayed, but I cannot 'see' how to apply the desired colors.
It is so frustrating that the help docs aren't clearer. I followed the examples in the help but, as I said above, I can colour a column but not a row.
At 02 AUG 2005 10:04AM Paul Evans wrote:
I think I have found the problem with my COLOR_BY_POS Send_Message.
I was trying to colour the row as I was building the LIST, in the same loop. I was not setting the LIST property of the TABLE until I had exited this loop, therefore the rows were not available to colour! Doh!
Now if I build my list in one loop and then set the LIST property, thereby initialising the rows in the table, I can then, in a second loop, set my desired rows to the colour that I want. Hey presto!
Thanks for pointing me in the right direction.