Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

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

The Sprezzatura Group

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.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/6d8950feeb8f26ae85257051003930ba.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1