Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

changing the win32::GUI window color

by orange (Beadle)
on Jun 08, 2007 at 10:24 UTC ( [id://619998]=perlquestion: print w/replies, xml ) Need Help??

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

Log In?
Username:
Password:

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

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

    No recent polls found