Hi,

Interestingly I was looking at this just yesterday. The draw() method draws lines directly on the DC (device context), and for this to have any effect, the window must be visible. So make sure you have called Show() on the window you want to draw on ...

Also you will see that no re-paint is done automatically. If you want to fix this, you'll need to call draw in a "Paint" event handler.

Here's a quick sample that works here for me (Win98, WIn32::GUI::1.0, Perl 5.8.6)

Rob.

# Example of using Win32::GUI::GridLayout::draw()
use strict;
use warnings;
use Win32::GUI;
use Win32::GUI::GridLayout;

my $grid;

my $win = Win32::GUI::Window->new(
 -title => "Show Grid Lines",
 -size => [400,400],
 -pos => [100,100],
 -onPaint => sub { $grid->recalc(); $grid->draw() },
);

$grid = Win32::GUI::GridLayout->apply($win,3,3,0,0);
$grid->recalc();
$win->Show();
$grid->draw();

Win32::GUI::Dialog();
exit(0);

Alexander Romanenko wrote:

Hi,

I use Win32::GUI::GridLayout, but the method draw draws nothing.
I have Windows XP SP2.



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users



Reply via email to