1. Alternating colors in List?

Is it possible to have the background of alternating lines in a list be 
alternating colors?  This would make reading the contents easier.
Or even have the lines of text be in alternating colors.

new topic     » topic index » view message » categorize

2. Re: Alternating colors in List?

----- Original Message -----
From: <1evan at sbcglobal.net>
To: "EUforum" <EUforum at topica.com>
Subject: Alternating colors in List?


>
>
> Is it possible to have the background of alternating lines in a list be
> alternating colors?  This would make reading the contents easier.
> Or even have the lines of text be in alternating colors.
>

The default list box that comes with Windows does not support this. To get
this effect you have to have an 'owner-drawn' control. This means that your
application is responsible for look of the control WIndows sends your
application messages when the control or parts of it need redrawing.

This is not a trival thing to do. One day I'll see what can be done to make
it easier for win32lib applications.
--
Derek.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Alternating colors in List?

Thanks, I thought that was the case, but was hoping somebody had found 
an easier way.

Derek Parnell wrote:
> 
> 
> ----- Original Message -----
> From: <1evan at sbcglobal.net>
> To: "EUforum" <EUforum at topica.com>
> Subject: Alternating colors in List?
> 
> 
>>Is it possible to have the background of alternating lines in a list be
>>alternating colors?  This would make reading the contents easier.
>>Or even have the lines of text be in alternating colors.
>>
> 
> The default list box that comes with Windows does not support this. To get
> this effect you have to have an 'owner-drawn' control. This means that your
> application is responsible for look of the control WIndows sends your
> application messages when the control or parts of it need redrawing.
> 
> This is not a trival thing to do. One day I'll see what can be done to make
> it easier for win32lib applications.
> --
> Derek.
> 
> 
> 
> TOPICA - Start your own email discussion group. FREE!
> 
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: Alternating colors in List?

Thanks, I'll check it out.


Jonas Temple wrote:
> 
> 
> As Derek mentioned, this can't currently be done with listview controls 
> but as a suggestion check out Phil Russel's EuGrid control.  He's got a 
> demo showing lines in the control with different colors.
> 
> Jonas
> 1evan at sbcglobal.net wrote:
> 
>>
>>Is it possible to have the background of alternating lines in a list be 
>>alternating colors?  This would make reading the contents easier.
>>Or even have the lines of text be in alternating colors.
>>
>>
> 
> 
> TOPICA - Start your own email discussion group. FREE!
> 
>

new topic     » goto parent     » topic index » view message » categorize

5. Re: Alternating colors in List?

On Saturday 07 June 2003 06:47 am, you wrote:
>
>
> Thanks, I thought that was the case, but was hoping somebody had found
> an easier way.

There is, but it involves using Linux and GTK:
-- make it a 'green bar' list;
   for row = 1 to 100 by 2 do
       set_row_background(list,row,#CCFFCC)
   end for

Sorry about Windows :)

Irv

new topic     » goto parent     » topic index » view message » categorize

6. Re: Alternating colors in List?

On Sat, Jun 07, 2003 at 03:17:43PM -0400, irvm at ellijay.com wrote:
> 
> 
> On Saturday 07 June 2003 06:47 am, you wrote:
> >
> >
> > Thanks, I thought that was the case, but was hoping somebody had found
> > an easier way.
> 
> There is, but it involves using Linux and GTK:
> -- make it a 'green bar' list;
>    for row = 1 to 100 by 2 do
>        set_row_background(list,row,#CCFFCC)
>    end for
> 
> Sorry about Windows :)
> 
> Irv
> 

Of course, if you did GTK2 programming under Windows, that'd still work,
but you'd be locked into using GTK widgets.

(Due to bugs, GTK1 under Windows is unlikely to support this.)

As expected, there'd be more overhead to doing things this way.

jbrown

-- 
 /"\  ASCII ribbon              | http://www.geocities.com/jbrown1050/
 \ /  campain against           | Linux User:190064
  X   HTML in e-mail and        | Linux Machine:84163
 /*\  news, and unneeded MIME   |

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu