Hi
I'm trying to create a label with transparent background, I know this
is asked before, but this
(http://sourceforge.net/mailarchive/message.php?msg_id=6975835)
doesn't work.
Here's what I want:
use Win32::GUI;
$win = new Win32::GUI::Window(
-name => "testwindow",
-title=> "Testing...",
-pos => [ 200, 150 ],
-size => [ 200, 200 ],
-OnTerminate => sub { return -1; }
);
$label1 = $win->AddLabel(
-name => "testlabel1",
-pos => [ 0, 0 ],
-size => [ 200, 200 ],
-background => "#FF0000",
-text => "Label1",
);
$label2 = $win->AddLabel(
-name => "testlabel2",
-pos => [ 100, 10 ],
-size => [ 80, 130 ],
-align=> "right",
-text => "Label2",
# -background => "#FF0000", ## That's what I want, but not that way :)
-pushexstyle => 0x00000020, ## Doesn't make the background transparent
);
$win->Show();
Win32::GUI::Dialog();
You can still see the background of label2 above label1. I also tried
things like -expushstyle, -style, -exstyle, -pushstyle, etc...
How to get this working?
Second: I've got some problems with -tabstop and -parent, here's an example:
use Win32::GUI;
$win = new Win32::GUI::Window(
-name => "testwindow",
-title=> "Testing...",
-pos => [ 200, 150 ],
-size => [ 200, 200 ],
-dialogui => 1,
-OnTerminate => sub { return -1; }
);
$groupbox = $win->AddGroupbox( # using a groupbox as a parent
-name => "groupbox",
-pos => [ 0, 0 ],
-size => [ $win->ScaleWidth, $win->ScaleHeight ],
-text => "Groupbox",
);
$field1 = $win->AddTextfield(
-name => "field1",
-size => [ 100, 20 ],
-pos => [ 10, 10 ],
-parent => $groupbox,
-prompt=> [ "test: ", 30 ],
-tabstop => 1,
);
$field2 = $win->AddTextfield(
-name => "field2",
-size => [ 100, 20 ],
-pos => [ 10, 40 ],
-parent => $groupbox,
-prompt=> [ "test2: ", 30 ],
-tabstop => 1,
);
$win->Show();
Win32::GUI::Dialog();
When I comment the -parent options in $field1 and $field2, it works
perfect, but I can't tab between them if I use the -parent option. Any
solutions?
Thanks, yorhel