in reply to Tk Listbox item padx
If you don't want to prepend a space to each element in the list, use a more advanced type of a list. For example, a Tk::HList:
#! /usr/bin/perl use warnings; use strict; use Tk; use Tk::HList; my $mw = 'MainWindow'->new(-title => 'Listbox test'); my $hl = $mw->HList(-drawbranch => 0, -pady => 0, -padx => 10 # <- This is what you need! )->pack; for ('A' .. 'H') { $hl->addchild("", -text => $_); } MainLoop();
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Tk Listbox item padx
by Anonymous Monk on Apr 09, 2020 at 09:03 UTC |
In Section
Seekers of Perl Wisdom