orange has asked for the wisdom of the Perl Monks concerning the following question:

hello
how can i change the window color in win32 GUI upon a click on a button, as an example i can change the window color to RED during the initialisation of the window using the option
-background => 255, 0, 0 ,
but i can't manage to change it outside this initialisation , as an example if i click a button.
use Win32::GUI; $Win = new Win32::GUI::Window( -left => 101, -top => 171, -width => 400, -height => 300, -name => "Win", -text => "Window Title", -background => [255, 255, 255], #color WHITE ); $Win->Show(); $Win->AddButton( -text => "ToRed", -name => "Button1", -left => 19, -top => 14, -width => 31, -height => 21, -foreground => 0, ); Win32::GUI::Dialog(); sub Win_Terminate { return -1; } sub Button1_Click { #something like the following false code: # $Win->background([255, 0, 0]); }

Replies are listed 'Best First'.
Re: changing the win32::GUI window color
by Anonymous Monk on Jun 08, 2007 at 23:34 UTC