Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Packing Frames in callback. Bug?

0 views
Skip to first unread message

Zbigniew Lukasiak

unread,
Sep 3, 2002, 12:40:36 PM9/3/02
to
I pack a new Frame in a callback, then put something into the Frame,
and then somethin afer the Frame.
The window does not resize properly. The result may vary - sometimes
it properly resizes horizontally but not verticaly, sometimes the
other way.
Here is a sample code:

use Tk;
use Tk::LabEntry;

$mw = tkinit;
$mw->Button(-text => "Open", -command => \&openit)->pack();

sub openit{
$polefr = $mw->Frame()->pack();
$polefr->Button(-text => 'aaaaa')->pack();
$mw->Button(-text => 'This does not appeare')->pack();
}
MainLoop;

Perhaps it may depend on the font used, you might add something more
do the frame, but in my environement the last Button is not visible.

Zbigniew Lukasiak

Zbigniew Lukasiak

unread,
Sep 4, 2002, 3:06:19 AM9/4/02
to
I've forgot to mention the versions:
perl5 (revision 5.0 version 6 subversion 1)

$Tk::version = '8.0';
$Tk::patchLevel = '8.0';
$Tk::VERSION = '800.024';
$Tk::XS_VERSION = $Tk::VERSION;
$Tk::strictMotif = 0;

ZL

Slaven Rezic

unread,
Sep 4, 2002, 4:15:18 AM9/4/02
to
z.luk...@e-katalyst.pl (Zbigniew Lukasiak) writes:

I can't see a problem with the script and fvwm2. Maybe it's a window
manager specific problem. Also note that once you have resized the
window using the window manager, Tk won't resize the window anymore.

Regards,
Slaven

--
Slaven Rezic - slaven...@berlin.de

sf-upload: make batch releases on SourceForge
http://sf-upload.sf.net

Zbigniew Lukasiak

unread,
Sep 11, 2002, 7:39:56 AM9/11/02
to
Slaven Rezic <slaven...@berlin.de> wrote in message news:<87ptvuu...@vran.herceg.de>...

>
> I can't see a problem with the script and fvwm2. Maybe it's a window
> manager specific problem. Also note that once you have resized the
> window using the window manager, Tk won't resize the window anymore.

I don't resize it manually. And I did try it under KDE, Gnome,
Blackbox and Enlightement with the same result. All on a debian woody
box.

Zbigniew Lukasiak

Slaven Rezic

unread,
Sep 11, 2002, 10:31:14 AM9/11/02
to
z.luk...@e-katalyst.pl (Zbigniew Lukasiak) writes:

On my FreeBSD box, it works with fvwm2, twm and wmaker (the sane
window managers) and it does not work with kde2, enlightenment and
blackbox (usually the window managers with more bugs). But it works
also with Tk804 and wish8.4 regardless of the window manager. Before
the release of Tk804, and as a workaround for older versions, it seems
that you can add $mw->idletasks before the creation of the second
button.

Regards,
Slaven

--
Slaven Rezic - slaven...@berlin.de

tkrevdiff - graphical display of diffs between revisions (RCS or CVS)
http://ptktools.sourceforge.net/#tkrevdiff

0 new messages