Hi,
Yes it does work - but only if you create a class, and attach it to the
window - there doesn't seem to be a way to change the color once the window
has been created - I've been playing with this in the last week or so:)
The code below creates a green child window.
Cheers,
jez.
---------
use Win32::GUI;
use strict;
my $greenbrush = new Win32::GUI::Brush(-color => [0,255,0]);
my $WC2 = new Win32::GUI::Class(
-name => "greenbrush",
-brush => $greenbrush,
);
my $win = new Win32::GUI::Window (
-pos => [100, 100],
-size => [400, 400],
-name => 'Window',
-text => 'Main Window',
);
my $child = new Win32::GUI::Window (
-parent => $win,
-name => 'ChildWin',
-pos => [100, 100],
-size => [100, 100],
-popstyle => WS_CAPTION | WS_SIZEBOX,
-pushstyle => WS_CHILD | WS_CLIPCHILDREN,
-pushexstyle => WS_EX_CLIENTEDGE,
-class => $WC2,
);
my $label=$child->AddLabel(
-name => 'Lab',
-pos => [20, 20],
-size => [50, 20],
-text => 'Some text',
-background => [255,0,0],
);
$child->Show();
$win->Show();
Win32::GUI::Dialog();
----- Original Message -----
From: "Bret Swedeen" <[EMAIL PROTECTED]>
To: <perl-win32-gui-users@lists.sourceforge.net>
Sent: Thursday, November 18, 2004 2:54 PM
Subject: [perl-win32-gui-users] Problems with background color
I need to get confirmation on the operational state of the
background color option for a window. I've been unsuccessful
getting it to work and from what I've read in various posts, the
option doesn't appear to work as designed. Can anyone confirm
that assessment? If it does work, can someone please post a
sample program with a simple window setting the color?
Thanks
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users