Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Win32::GUI frustration

by jplindstrom (Monsignor)
on Jun 29, 2004 at 12:20 UTC ( [id://370452]=note: print w/replies, xml ) Need Help??


in reply to Win32::GUI frustration

It's actually non-trivial :) You need to define your own "class" (not an OO class) and assign the color to it, then assign the "class" to your window. This is roughly how to do it:

my $clsColor = Win32::GUI::Class->new( -name => "classColor", -color => 2, ) or die("Could not create Class\n");

And when you create the window, add the option

-class => $clsColor,

If you happen to use The GUI Loft, I stole this snippet from the demo program FetchURL. It's a bit different, so copy the demo program and go from there.

/J

Replies are listed 'Best First'.
Re^2: Win32::GUI frustration
by Anonymous Monk on Jun 29, 2004 at 14:12 UTC
    That's ace - thanks!

    Although if you can tell me how '2' is 'pale blue', that'd be ace, too..

    I tried the following, as I need a specific colour, having read the faq, to no avail.. 'Could not create class'

    #Brush to define the colour my $brush = new Win32::GUI::Brush(-color=>[198, 223, 198])or die("Coul +d not create Brush\n"); #Class for the colour my $clsColour = Win32::GUI::Class->new( -name => "classColour", -color => $brush, ) or die("Could not create Class +\n");
Re^2: Win32::GUI frustration
by flippy (Novice) on Jun 29, 2004 at 14:38 UTC
    Above was me -- sorry, forgot to log in!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://370452]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (8)
As of 2024-04-19 14:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found