Re: XPM's in Listviews

new topic     » goto parent     » topic index » view thread      » older message » newer message

Tony,

In case you had trouble figuring out how to use the examples Derek mentioned
to use xpm's in ListViews (I did, even though it turned out to be simple),

copy an xpm into 'listviewstyles.exw',  & then change the "icon01" statement
from:

icon01 = addIcon( extractIcon( "icon01.ico" ) )  to:
icon01 =  addXpm(AnXpmConstantName).

Here's a sample xpm, in case you got the format wrong (again, *I* did):

constant AnXpmConstantName = {
"24 24 8 1",
"         c None",
".        c #000000",
"+        c #C46D74",
"@        c #9F3C44",
"#        c #B5444E",
"$        c #BD5A62",
"%        c #7B2D34",
"&        c #8C343C",
"                        ",
"                        ",
"                        ",
"                        ",
"                        ",
"                        ",
"         ..      .      ",
"        .+ at .    .#.     ",
"        .##.   .$#.     ",
"         .# at . .$#%.     ",
"         .##..$#&.      ",
"          .####@.       ",
"          .####.        ",
"         .$###.         ",
"        .$####.         ",
"       .$#&..#&.        ",
"      .+#&. . at #.        ",
"      .#&.   .#@.       ",
"       ..    . at #.       ",
"              ..        ",
"                        ",
"                        ",
"                        ",
"                        "}

Dan Moyer


----- Original Message -----
From: "Derek Parnell" <ddparnell at bigpond.com>
To: "EUforum" <EUforum at topica.com>
Sent: Monday, May 12, 2003 12:04 AM
Subject: Re: XPM's in Listviews


>
> On Mon, 12 May 2003 16:47:36 +1000, Tony Steward <tsteward at dodo.com.au>
> wrote:
>
> >
> > Re submitted as no replies.
> >
> > Hello All,
> > Can anyone give me a quick example of how to use a XPM image in a LV
> > instead of an icon.
> > This XPM would already be loaded as a global constant from an include
> > file of many XPM's
> >
> > Thanks
> > Tony
>
> Take a look at the demo programs 'listviewstyles.exw' and
> 'listviewstyles2.exw', that come with win32lib.
>
> --
>
> cheers,
> Derek Parnell
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu