|
From: Erick J. B. <er...@e-...> - 2001-02-03 19:01:14
|
When I create a label and/or combobox, give them color attributes and =
then try and use the -style option, the colors are completely ignored. =
That is, if I just use the control without the -style option, then the =
colors work. For example, the following works great:
use Win32::GUI;
$MainWin =3D new Win32::GUI::Window(
-name =3D> "MainWin",
-text =3D> "Style Option",
-size =3D> [200, 200],
-pos =3D> [70, 70],
);
$MainWin->AddLabel(
-text =3D> "Hello World!",
-size =3D> [$MainWin->Width, $MainWin->Height],
-pos =3D> [0, 0],
-background =3D> [0,51,102],
-foreground =3D> [255,255,255],
);
$MainWin->Show();
Win32::GUI::Dialog();
sub MainWin_Terminate {
$MainWin->Hide();
return -1;
}
#--------------EOF---------------#
However, this ignores the color option altogether:
use Win32::GUI;
$MainWin =3D new Win32::GUI::Window(
-name =3D> "MainWin",
-text =3D> "Style Option",
-size =3D> [200, 200],
-pos =3D> [70, 70],
);
$MainWin->AddLabel(
-text =3D> "Hello World!",
-size =3D> [$MainWin->Width, $MainWin->Height],
-pos =3D> [0, 0],
-style =3D> ES_CENTER | WS_VISIBLE,
-background =3D> [0,51,102],
-foreground =3D> [255,255,255],
);
$MainWin->Show();
Win32::GUI::Dialog();
sub MainWin_Terminate {
$MainWin->Hide();
return -1;
}
#--------------EOF---------------#
erick
never stop questioning
www.jeb.ca
|