[perl-win32-gui-users] textfield prompt color

2002-07-10 Thread Scott Wildenberg
How would I set the background color for a textfield prompt label or in a
checkbox label? I can see how I might be able to set it if I could get the
handle for that label, but I can't figure out how I would do that either.
Is there a way to get the handle for a control that you have a name for but
that you don't have a reference for?

Thanks much!

Scott C. Wildenberg, Ph.D.
University of Minnesota
Dept. of Medicine-Genetics
Infotech Specialist
[EMAIL PROTECTED]

Prove all things; hold fast that which is good. -- I Thes. 5:21 


<>

[perl-win32-gui-users] RE: communication between GUI scripts

2002-07-10 Thread Rogers, John
These two curious scripts below where posted on this list some time ago,
(there is no archive search sorry I dont know who)

Its probably not quite what you wanted, but could be worth a play.



#-sender.pl
#!perl -w
use strict;
use Win32::GUI;

my $hwind = &gethandle;
#my $hwind = ;
print "hwind $hwind";
print "\nEnter text: ";
my $text = ;

Win32::GUI::Text($hwind, $text);
Win32::GUI::InvalidateRect($hwind, 1);
#EOF
sub gethandle{
my $winname='Autoscroller';
my $desktop = GUI::GetDesktopWindow();
my $window = GUI::GetWindow($desktop, GW_CHILD);
while($window) {my $title = GUI::Text($window);
if($title eq
"$winname"){print "found $winname\n";

my $window2 = GUI::GetWindow($window, GW_CHILD);

$hwind=$window2;

}
$window = GUI::GetWindow($window, GW_HWNDNEXT);
}
$hwind}
###end

#--mainwindow.pl
use strict;
use Win32::GUI;

my $winMain = new Win32::GUI::Window(
 -left   => 13,
 -top=> 32,
 -width  => 439,
 -height => 260,
 -name   => "winMain",
 -text   => "Autoscroller",
 );

$winMain->AddLabel(
 -text=> "lblTest",
 -name=> "lblTest",
 -left=> 0,
 -top => 0,
 -width   => 400,
 -height  => 250,
 );

$winMain->lblTest()->Text("The hwind is: " .
$winMain->lblTest()->{-handle});
$winMain->Show();
Win32::GUI::Dialog();
finish




 

John Rogers
System Engineer
Oce Australia
Ph 3212 8114 


## 
Disclaimer 

If this e-mail has been sent to you in error, please notify 
Océ-Australia Limited immediately and delete this e-mail from 
your system. 

Any views expressed in this e-mail are those of the individual 
sender and may not necessarily reflect the views of 
Océ-Australia Limited. 
##