Hey,

I have going deep into this module since I'm customizing it for my own purposes... :) However, I'm not sure how to change the Button's (HButton) height! At row 150 I tried the following:
my $hdr = $f->HButton( -takefocus=>0, -padx=>0, -width=>1, -borderwidth=>2, -highlightthickness=>0 )->pack(qw/-side top -anchor n -fill x/); $hdr->GeometryRequest($hdr->reqwidth, 18); # Row 150, New! $hdr->update; # Row 151, New! $w->Advertise("heading" => $hdr);
But no luck. Well, the first buttons are changed, at starup, but not all. And the whole thing is too small. I also changed at around row 102:
if (defined(my $pixels = $w->cget('-pixelwidth'))) { $w->GeometryRequest($pixels, 18); # 18 is New! Was $mw->re +qheight before }
But here it's just changed when I click or drag. I want it to be set at startup! Testcode:
use Tk; use Tk::MListbox; use strict; use warnings; my $mw = new MainWindow(); my $frame = $mw->Frame(-bd => 2, -relief => 'raised')->pack(-expand => + 1, -fill => 'both'); my $scrolledMListbox = $frame->Scrolled( qw/MListbox -selectmode browse -scrollbars oe/ )->pack(-expand => 1, -fill => 'both'); my @list = ( "a", "b" ); $scrolledMListbox->columnInsert('end', -text => 'Path'); $scrolledMListbox->columnInsert('end', -text => 'Modified'); $scrolledMListbox->columnInsert('end', -text => 'Dir'); $scrolledMListbox->columnInsert('end', -text => 'File'); $scrolledMListbox->insert('end', [ "a", "b", "s", "l"] ); $scrolledMListbox->insert('end', [ "c", "d", "f", "e"] ); MainLoop;
Thanks,
Ace

In reply to Changing Buttonsize in MListbox by Ace128

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.