It works fine using the default tabstop positions (don't call SetTabStops()). There's a bug in the SetTabStops() implementation that causes the window handle (a LARGE number) to be used as the first tabstop position, causing any text after the first tab to be send way over to the right, and out of sight.

I've fixed it locally, and the fix will make the next release.

Regards,
Rob.

#!perl -w
use strict;
use warnings;

use Win32::GUI();

my $mw = Win32::GUI::Window->new(
        -title => "Listbox with Tabstops",
        -size => [400,300],
);

my $lb = $mw->AddListbox(
        -size => [350,250],
        -usetabstop => 1,
);
#$lb->SetTabStops(80,160);
$lb->AddString("Hello\tWorld\tHello\tWorld");

$mw->Show();
Win32::GUI::Dialog();
exit(0);

__END__

[EMAIL PROTECTED] wrote:
This is the first time I've tried to use a mail list.  Sorry if I make a
newbe mistake.

Can anyone tell me how to use tabs in the list box control.  I want to
line up several columns in a list box.  It seems like the "usetabstop"
option would do this, but I can't get it to work.

I have specified "usetabstop" is 1 when I create the list box.  I've
called the method SetTabStops after creating the list.  I've created a
text string with \t embedded in the string.  When I add the string to
the list box everything after the first \t disappears.  If I change the
"usetabstop" to 0 then I see all my text on the line with a graphic
symbol where the \t is, so it seems to be doing something.

Suggestions on how to fix this or suggestions on an alternate method to
get the same result would be appreciated.  Also, this is the first time
I've tried to use the win32 gui.

Thanks,
Roger


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/


Reply via email to