Hi,
Would someone be able to test the below and confirm whether it's just me?
Specifically I can't get coloured text if the 'align' is in place for the
text field, but commented out the colours come back. What am I doing
wrong?!
Thanks,
Toby.
use Win32::GUI;
$Desktop = Win32::GUI::GetDesktopWindow();
$Desktop_Width = Win32::GUI::Width($Desktop);
$Desktop_Height = Win32::GUI::Height($Desktop);
$Hello_Left = $Desktop_Width / 4;
$Hello_Top = $Desktop_Height / 4;
$Hello_Width = $Desktop_Width / 2;
$Hello_Height = $Desktop_Height / 2;
$Message = "\r\n\r\n\r\nHello World\r\n\r\n";
$Hello_Window = new Win32::GUI::Window(
-name => "Hello World",
-dialogui => 1,
-left => $Hello_Left,
-top => $Hello_Top,
-width => $Hello_Width,
-height => $Hello_Height,
-text => "Hello Window",
-minsize => [ $Hello_Width, $Hello_Height,],
-maxsize => [ $Hello_Width, $Hello_Height,],
-topmost => 1,
);
$font = Win32::GUI::Font->new(
-name => "Times New Roman",
-size => 48,
);
$Hello_Window->AddTextfield(
-name => "Hello_Text",
-font => $font,
-foreground => [0,255,0],
-background => [0,0,255],
-multiline => 1,
-text => $Message,
-left => 0,
-top => 0,
-width => $Hello_Width,
-height => $Hello_Height - 100,
-readonly => 1,
-align => center,
);
$Hello_Window->Show();
Win32::GUI::Dialog();
sub Window_Terminate {
-1;
}
-----Original Message-----
From: Ounsted, Toby [mailto:[EMAIL PROTECTED]
Sent: 14 October 2003 12:40
To: Perl-Win32-Gui-Users (E-mail)
Subject: [perl-win32-gui-users] PRoblems formatting text box
Hi all,
I'm trying to generate a text box within a window.
$Countdown_Window->AddTextfield(
-name => "Countdown_Text",
-font => $font,
-foreground => [0,255,0],
-background => [0,0,255],
-multiline => 1,
-text => $Message,
-left => 0,
-top => 0,
-width => $Countdown_Width,
-height => $Countdown_Height - 100,
-readonly => 1,
# -align => center,
);
Simple problem; when I comment out the 'align =>...' statement then the
text appears green on blue as per the prescribed colours. When I apply the
'align => center' statement then the text is center aligned but comes out
black on grey (system colours). Does anyone know why the align is affecting
the colour and what can be done to fix it?
Versions:
Win32::GUI 0.0.558
Perl v5.8.0
Many thanks in advance,
Toby.