Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Checkbutton problem
I have several checkbuttons in a main window and a getOpenFile dialog box
that opens over them.  When you double click on a file in the dialog box
the checkbutton below the dialog box is also activated.  Is there any easy
way to fix this without changing the geometry?

Here is an example:

use Tk;
use strict;

my @vals = (1,2,3,4,5,6,7,8);
my ($key, %bt);

my $mw = MainWindow -> new(-title => 'a test program');
$mw ->geometry("300x300+150+90");
foreach $key (@vals) {
$bt{$key} = $mw -> Checkbutton(-text => $key) -> pack();
}
my $open = $mw -> Button(-text => 'open',
-command => \&open)-> pack();
my $exit_but = $mw -> Button(-text => 'Exit',
-command => \&close) -> pack();

MainLoop;

sub open {
$mw -> getOpenFile();
}

sub close {
$mw -> destroy;
}



Report this thread to moderator Post Follow-up to this message
Old Post
scottmf
05-20-05 01:57 AM


Re: Checkbutton problem
In article < ae4e3b984230dd7b5b33cd56ea53977a@localho
st.talkaboutprogramming.
com>,
fleming.scott@nospam says...
> I have several checkbuttons in a main window and a getOpenFile dialog box
> that opens over them.  When you double click on a file in the dialog box
> the checkbutton below the dialog box is also activated.  Is there any easy
> way to fix this without changing the geometry?

What OS?  Which version of Tk?  I don't see this on Windows 2000,
ActiveState v5.8.6, Tk 804.027.

> Here is an example:
>
> use Tk;
> use strict;
>
> my @vals = (1,2,3,4,5,6,7,8);
> my ($key, %bt);
>
> my $mw = MainWindow -> new(-title => 'a test program');
> $mw ->geometry("300x300+150+90");
> foreach $key (@vals) {
>     $bt{$key} = $mw -> Checkbutton(-text => $key) -> pack();
> }
> my $open = $mw -> Button(-text => 'open',
> 			 -command => \&open)-> pack();
> my $exit_but = $mw -> Button(-text => 'Exit',
> 			     -command => \&close) -> pack();
>
> MainLoop;
>
> sub open {
>     $mw -> getOpenFile();
> }
>
> sub close {
>     $mw -> destroy;
> }

--
Go to http://MarcDashevsky.com to send me e-mail.

Report this thread to moderator Post Follow-up to this message
Old Post
Marc Dashevsky
05-20-05 01:57 AM


Re: Checkbutton problem
Sorry;

Windows XP
ActiveState v5.6 Tk 800.024

~Scott


Report this thread to moderator Post Follow-up to this message
Old Post
scottmf
05-20-05 01:57 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PerlTk archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:08 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.