<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
            "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">

<channel>
<title>perl-tk archive @ ASPN</title>
<link>http://ASPN.ActiveState.com/ASPN/Mail/Browse/Threaded/perl-tk</link>
<description>perl-tk @ ASPN (http://ASPN.ActiveState.com/ASPN/Mail/Browse/Threaded/perl-tk)</description>
<language>en-us</language>
<copyright>Copyright 2005, ActiveState</copyright>
<managingEditor>aspn-feedback@activestate.com</managingEditor>
<webMaster>aspn-feedback@activestate.com</webMaster>

<image>
<title>perl-tk @ ASPN Mail Archive</title>
<url>http://ASPN.ActiveState.com/ASPN/img/logo_78x25.gif</url>
<link>http://ASPN.ActiveState.com/ASPN/Mail/Browse/Threaded/perl-tk</link>
</image>

<item>
<title>Re: [ANNOUNCE (well, sortof)] Tk::StyledButton</title>
<link>http://ASPN.ActiveState.com/ASPN/Mail/Message/perl-tk/3171243</link>
<description>&lt;PRE>Dean Arnold wrote:

> (I've managed to get some shiny chrome sortof working, but don't
> have anymore time for this, so I'm announcing and hoping someone
> can pick up the slack)
>
> An alpha release of Tk::StyledButton is available at
> www.presicient.com/styledbtn. It provides some decent
> gradient and shape effects for buttons using canvases.
> BTW: I've only tested it on Win32 to date; I suspect
> there may be font issues on Linux/et al.
>
> I won't CPAN it for awhile, because...
>
> I don't really have time for it anymore, so I'm hoping
> someone will find it useful enough to pick it up and
> get it running a bit better. It currently functions,
> but its not "polished" (e.g., some geometry requests
> don't seem to behave, I was hoping to create
> styled versions of common dialog widgets and esp.
> Tk::DynaTabFrame, the GD capture capability is flaky, etc.)
>
> If anyone is interested in taking it over, let me know.

Something similar-looking is already done, in Tcl/Tk.

example screenshots are:

http://tktable.sourceforge.net/tile/screenshots/pixmap.html
http://wiki.tcl.tk/4562

Available to Perl with Tcl::Tk or Tkx modules

Those who strictly decided to use narrow set of perl/Tk widgets will not
be able to use these Tcl/Tk widgets, but normally any tcl/tk widgets are
usable from perl.



>
> Regards,
> Dean Arnold
> Presicient Corp.
> -++**==--++**==--++**==--++**==--++**==--++**==--++**==
> This message was posted through the Stanford campus mailing list
> server.  If you wish to unsubscribe from this mailing list, send the
> message body of "unsubscribe ptk" to majordomo@...
>
>
>
>


-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@...
&lt;/PRE></description>
</item>

<item>
<title>[ANNOUNCE (well, sortof)] Tk::StyledButton</title>
<link>http://ASPN.ActiveState.com/ASPN/Mail/Message/perl-tk/3170680</link>
<description>&lt;PRE>(I've managed to
get some shiny chrome sortof working, but don't
have anymore time for this, so I'm announcing and hoping someone
can pick up the slack)

An alpha release of Tk::StyledButton is available at
www.presicient.com/styledbtn. It provides some decent
gradient and shape effects for buttons using canvases.
BTW: I've only tested it on Win32 to date; I suspect
there may be font issues on Linux/et al.

I won't CPAN it for awhile, because...

I don't really have time for it anymore, so I'm hoping
someone will find it useful enough to pick it up and
get it running a bit better. It currently functions,
but its not "polished" (e.g., some geometry requests
don't seem to behave, I was hoping to create
styled versions of common dialog widgets and esp.
Tk::DynaTabFrame, the GD capture capability is flaky, etc.)

If anyone is interested in taking it over, let me know.

Regards,
Dean Arnold
Presicient Corp.
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@...
&lt;/PRE></description>
</item>

<item>
<title>Re: Tk::HList oddity</title>
<link>http://ASPN.ActiveState.com/ASPN/Mail/Message/perl-tk/3167272</link>
<description>&lt;PRE>I haven't tried
this under Linux but with ActiveState 5.8.8-817 it works 
fine.
The "Double..." message appears with cols_work and cols_no_work.  In the
past, I haven't had any problems with the HList widget on Linux...

As a separate pet peeve, why does the Browse command get called on MouseDown
as well as MouseUp?  Shouldn't the browse functionality only happen on 
the Up event?

And as a follow up, is there anyway to configure the DoubleClick timeout 
under Tk?
If the user clicks twice within the timeout period, the I'd prefer the 
browsecmd not to
happen and the command sub get called...

I've tried looking at the widget options, X, etc. and didn't see 
anything that matched.	I
suppose I could avoid the convenience functions and just look at the raw 
events myself
(MouseUp, Double-1, etc.) but I'm a lazy programmer ;-)

Sorry I couldn't help with the original problem and thanks for any 
assistance on the
subsequent issues :-)



Sean Kamath wrote:
> Hi all,
>
> OK, here at work we've just run into a little bug with Tk::HList.
>
> I've got a test case and everything.
>
> If you comment out the line
>
> my $cols = $cols_no_work;
>
> (so that $cols  is 5, or "$cold_work"), you'll see the "correct"
> behaviour (that is, clicking will produce "Browsing....", and double
> clicking will product "Double....".).  Put it back or leave it in, and
> you'll never see anything but "Browsing....".
>
> perl 5.8.8 (and 5.8.6)
> RHEL WS4U3 (and others)
> $Tk::version	   = '8.4';
> $Tk::VERSION	   = '804.027';
>
> Any hints, suggestions, etc?
>
> Sean
>
> Here's the test code.
>
> #!/usr/local/bin/perl
>
> use Tk;
> use Tk::HList;
>
>
> my $cols_work = 5;
> my $cols_no_work = 6;
>
> # Set $cols = $cols_no_work to see this break.
>
> my $cols = $cols_work;
> my $cols = $cols_no_work;
>
> my $win = new MainWindow;
> my $hlist = $win->HList(
>     -header => 1,
>     -columns => $cols,
>     -browsecmd => sub { print STDERR "Browsing....\n" },
>     -command => sub { print STDERR "Double....\n" }
> )->pack(
> );
> for ( my $hdr=0;$hdr&lt;$cols;$hdr++ ) {
>     $hlist->headerCreate( $hdr,
>	  -itemtype => window,
>	  -widget => $hlist->Label(-text => "header $hdr")
>     );
> }
>
> $hlist->add("test");
> $hlist->itemCreate( "test", 0, -text => "Testing" );
> MainLoop();
> -++**==--++**==--++**==--++**==--++**==--++**==--++**==
> This message was posted through the Stanford campus mailing list
> server.  If you wish to unsubscribe from this mailing list, send the
> message body of "unsubscribe ptk" to majordomo@...
>
>   

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@...
&lt;/PRE></description>
</item>

<item>
<title>Tk::HList oddity</title>
<link>http://ASPN.ActiveState.com/ASPN/Mail/Message/perl-tk/3167153</link>
<description>&lt;PRE>Hi all,

OK, here at work we've just run into a little bug with Tk::HList.

I've got a test case and everything.

If you comment out the line

my $cols = $cols_no_work;

(so that $cols	is 5, or "$cold_work"), you'll see the "correct"
behaviour (that is, clicking will produce "Browsing....", and double
clicking will product "Double....".).  Put it back or leave it in, and
you'll never see anything but "Browsing....".

perl 5.8.8 (and 5.8.6)
RHEL WS4U3 (and others)
$Tk::version	 = '8.4';
$Tk::VERSION	 = '804.027';

Any hints, suggestions, etc?

Sean

Here's the test code.

#!/usr/local/bin/perl

use Tk;
use Tk::HList;


my $cols_work = 5;
my $cols_no_work = 6;

# Set $cols = $cols_no_work to see this break.

my $cols = $cols_work;
my $cols = $cols_no_work;

my $win = new MainWindow;
my $hlist = $win->HList(
    -header => 1,
    -columns => $cols,
    -browsecmd => sub { print STDERR "Browsing....\n" },
    -command => sub { print STDERR "Double....\n" }
)->pack(
);
for ( my $hdr=0;$hdr&lt;$cols;$hdr++ ) {
    $hlist->headerCreate( $hdr,
	-itemtype => window,
	-widget => $hlist->Label(-text => "header $hdr")
    );
}

$hlist->add("test");
$hlist->itemCreate( "test", 0, -text => "Testing" );
MainLoop();
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@...
&lt;/PRE></description>
</item>

<item>
<title>undocumented tainting of variables with UTF8</title>
<link>http://ASPN.ActiveState.com/ASPN/Mail/Message/perl-tk/3156664</link>
<description>&lt;PRE>This bug was
reported against the Debian package of Perl-Tk. Does anyone
have any comments and/or suggestions for a solution?

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=362002

Package: perl-tk
Version: 1:804.027-4
Severity: normal


Tk::Entry fields (at least) change strings that are bound to them to
UTF8 strings (even if there's only 7bit characters in the strings).
That means that anything that is concatenated with such strings
becomes UTF8 automatically.

Now, if those strings happen to be filenames which contain latin1 (or
other non-UTF8, non-ascii) characters, when they get used by perl
(e.g. with "system", or "-d $filename"), they are converted to UTF8
and therefore no longer match the filenames on disk.

code to reproduce:

#!/usr/bin/perl -w
use strict;
use Tk;

my $fn = "te\xDFt"; # &#223;
my $curdir = ".";
my $fullfn;
my $mw = MainWindow->new;

open F, ">$fn"; close F;
warn "touched $fn\n"; warnutf($fn);

$fullfn = "$curdir/$fn";
warn "$fullfn exists\n" if -e $fullfn;
warnutf($fullfn);

$mw->Entry(-textvariable => \$curdir);

warn "bound curdir to Entry\n";
$fullfn = "$curdir/$fn";
warn "$fullfn doesn't exist\n" unless -e $fullfn;
warnutf($fullfn);

sub warnutf {
    my $s = shift;
    warn "String is UTF-8\n" if utf8::is_utf8($s);
}

- - - - - - - - - - - - - - - - - - - - - - - - - - - -

Is this actually a bug?

regards,

Colin


-- 
Colin Tuckley	   |  colin@...  |  PGP/GnuPG Key Id
+44(0)1903 236872  |  +44(0)7799 143369  |     0x1B3045CE

"Apple" (c) Copyright 1767, Sir Isaac Newton.
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@...
&lt;/PRE></description>
</item>

<item>
<title>Patch for Gedi</title>
<link>http://ASPN.ActiveState.com/ASPN/Mail/Message/perl-tk/3142431</link>
<description>&lt;PRE>Hi all,

I'm finally back (not that I expect anyone to know I was gone ;-)) after 
about a year and a half.  It's a long story, but I'm no longer at Xerox. ;-)

Anyway, at my new gig, I compiled Perl/TK from scratch off CPAN as of a 
couple of days ago (5.8.8 w/ Tk 804.027), and one of my checks to make sure 
everything was working was to run gedi, which failed with:

bad option "expand": must be -after, -anchor, -before, -expand, -fill, -in, 
-ipadx, -ipady, -padx, -pady, or -side at 
/home/skamath/work/perl/lib/site_perl/5.8.8/i686-linux/Tk/Widget.pm line 1144.

The fixes are trivial (all are fixes to pack() arguments), so I have a 
patch.	I can't remember what do wo with the patch.  I searched the 
archives, and there is in fact a patch two sent to the mailing list, so 
here's mine (I'm now using Thunderbird for email, so I'm hoping attaching 
it will work).

Sean
&lt;/PRE></description>
</item>

<item>
<title>RE: MainWindow focus</title>
<link>http://ASPN.ActiveState.com/ASPN/Mail/Message/perl-tk/3135291</link>
<description>&lt;PRE>> -----Original
Message-----
> From: owner-ptk@... 
> [mailto:owner-ptk@... On Behalf Of listmail
> Sent: May 19, 2006 8:27 AM
> To: ptk@...
> Subject: MainWindow focus
> 
> Pardon me for the lack of better terminology.  I need to 
> determine from within a Tk application if it is currently the 
> top level task/process in Windows.  I suppose I mean that 
> MainWindow is currently focused instead of any other windows 
> application.	I am not finding a method that I could use such 
> as in Tk:Widget.  Is this something that needs/can be 
> acheived with an API call?

###################################################
use Tk;
use Win32::API;
use strict;

my $fgwindow='';
my $mw=tkinit;
my $label = $mw->Label(-textvariable=>\$fgwindow)->pack;
$mw->Button(-command=>sub{$mw->destroy},-text=>'Quit')->pack;
$mw->idletasks; #necessary on win32 to get decorative frame
my $ID = hex($mw->frame);
my $API = new Win32::API('user32','GetForegroundWindow','', 'N');
$mw->repeat(500,\&amp;getFgWindow);
MainLoop;

sub getFgWindow {
  my $handle = $API->Call;
  if ($handle == $ID) {
     $fgwindow = "Tk Window has focus";
  }
  else {
     $fgwindow = $handle;
  }
}
###################################################

--
Jack
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@...
&lt;/PRE></description>
</item>

<item>
<title>MainWindow focus</title>
<link>http://ASPN.ActiveState.com/ASPN/Mail/Message/perl-tk/3134693</link>
<description>&lt;PRE>Pardon me for the
lack of better terminology.  I need to determine from 
within a Tk application if it is currently the top level task/process in 
Windows.  I suppose I mean that MainWindow is currently focused instead 
of any other windows application.  I am not finding a method that I 
could use such as in Tk:Widget.  Is this something that needs/can be 
acheived with an API call?
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@...
&lt;/PRE></description>
</item>

<item>
<title>JComboBox problem</title>
<link>http://ASPN.ActiveState.com/ASPN/Mail/Message/perl-tk/3132889</link>
<description>&lt;PRE>Hi,

I have a program that uses Tk::JComboBox. Since version 1.0 the behaviour of
it changed (part of which was my suggestion even). Probably a lot of code
has changed inside the widget though, since it doesn't work anymore as
before:

I have another JComboBox, that has as -selectcommand the following sub:

sub AbtGetLade {
	@... $ladestellen{$anfabt});
	$ladestellenselect->setSelectedIndex( 0 );
	$ladestellenselect->showPopup();
}

so that sub fills another JComboBox and should display its ListBox.

now when the sub is called, the ListBox pops up, but the whole program
(including that JComboBox) doesn't react anymore on mouseclicks. I can TAB
through all widgets, but no more mouse. In the commandbox I have the
following error:

untie attempted while 2 inner references still exist at
C:/Perl/site/lib/Tie/Wat
ch.pm line 362.

as soon as I remove the ->showPopup call, everything works as expected. But
exactly the showPopup is what the users want (they want to see if there are
more than 1 entry).

Before the new version of JComboBox it worked fine...

regards, Lars
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@...
&lt;/PRE></description>
</item>

<item>
<title>Re: text field focus and placement of cursor</title>
<link>http://ASPN.ActiveState.com/ASPN/Mail/Message/perl-tk/3114160</link>
<description>&lt;PRE>On Tue, 2006-04-18
at 20:28 -0400, Todd Littlefield wrote:
> Hi Johan,
> 
>     I haven't tried this myself but according to the Text widget 
> methods, there is a SetCursor
> method:
> 
> $text->SetCursor( position )
> 
>     Moves the insert mark to position.
> 
> That sounds more like the method you want to use...  Try that.

indeed todd !
thank you

> 
> (As a side note, try installing the ActiveState perl distribution on a 
> Windows box...  You'll
> find a great compendium of documentation on a lot of perl modules that 
> you may or may
> not have installed.  The Tk stuff in particular is very useful...  If 
> nothing else, install it and copy
> the entire HTML docs directory to your work system...)
> 
> Good luck.
> 
> Johan Meskens CS3 jmcs3 wrote:
> > On Mon, 2006-04-17 at 20:03 +0200, Johan Meskens CS3 jmcs3 wrote:
> >   
> >> hello
> >>
> >>
> >> the body always repeats the subject in addition of a few words
> >>
> >> my question:
> >>
> >> what are the methods to let a text field take focus
> >> and put the cursor at a specific position within that text field ?
> >>	 
> >
> > i found the following:
> >
> > $textfield->focus; 
> > $textfield->icursor( "1.0" );
> >
> > but i get the error:
> > Tk::Error: Can't locate auto/Tk/Text/icursor.al in @... ... etc.
> >
> > so i guess icursor is not a method that textfields respond to ?
> >
> > thanks
> > jmcs3
> >
> >   
> >> thank you
> >>  - also thank you for yesterday's answers to the hlist question !
> >>
> >> kind regards
> >> jmcs3
> >>	 
> 
> 

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@...
&lt;/PRE></description>
</item>

</channel>
</rss>