perltk

Perl/Tk Memory Leak When Using destroy() Command

爱⌒轻易说出口 提交于 2020-12-12 09:36:21
问题 I am having an issue with a large leak in Perl/Tk running on Unix. I am unable to post most of the code due to certain restrictions, but I have been able to identify what is causing the memory leak and create a small program that has the same symptoms. Basically I am running a GUI where a frame is destroyed and repopulated regularly. This seems to cause a large memory leak that keeps growing however. I thought the destroy command would get rid of all traces in memory, but it does not seem to

Perl/Tk menubar quirks

a 夏天 提交于 2019-12-25 03:36:22
问题 I'm trying to add a menubar with the standard File Open, Save and New options. However, instead of behaving as expected, the subroutine handling the open, save and new actions is launched upon creation of the frame. But, when I actually click on them, it is not. Following is the code I'm using. (Main window contains only the menubar) #!/usr/bin/perl use strict; use warnings; use diagnostics; use Data::Dumper; use Tk 8.0; use Tk::NoteBook; use Tk::MsgBox; my $mw=MainWindow->new; $mw->geometry(

Limiting scroll bar length

帅比萌擦擦* 提交于 2019-12-08 20:03:41
问题 I am trying to create a simple notepad like GUI using Perl Tk. I have used the Scrolled widget to create a Text widget with two scrollbars - one on the right and one on the bottom. The place where the two scrollbars meet looks like this: However I would like to make it look like what is seen in the "Notepad" application by Microsoft. This is how I want it: As you can see, there is a now an "empty square" where the two scrollbars meet. One more feature of notepad is that this "square" can be