RE: Perl Tk system button

2009-09-12 Thread Geoff Horsnell
Lynn,

Many thanks for that - it worked a treat.
FYI, the iconimage line has to be (re)applied to each new subwindow, or the
"Tk" icon prevails.

Cheers

Geoff

-Original Message-
From: Lyndon Rickards [mailto:l...@debscave.com] 
Sent: Saturday, September 12, 2009 1:54 AM
To: Geoff Horsnell; perl-win32-users@listserv.activestate.com
Subject: Re: Perl Tk system button





>  ---Original Message---
>  From: Geoff Horsnell 
>  Subject: Perl Tk system button
>  Sent: Sep 11 '09 17:02
>  
>  Is it possible to change the image in the system menu button (The red Tk
>  button in the top left hand corner of all GUI windows)? I would like to
add
>  my own icon in place of this symbol.
>  
>  
#!perl -w

use strict;
use Tk;
use Tk::Photo;

my $mw = tkinit;

my $ico = $mw->Photo(-file=>"c:/myapp/icon.bmp");

$mw->iconimage($ico);

MainLoop;

HTH - Lynn.



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perl Tk system button

2009-09-11 Thread Lyndon Rickards



>  ---Original Message---
>  From: Geoff Horsnell 
>  Subject: Perl Tk system button
>  Sent: Sep 11 '09 17:02
>  
>  Is it possible to change the image in the system menu button (The red Tk
>  button in the top left hand corner of all GUI windows)? I would like to add
>  my own icon in place of this symbol.
>  
>  
#!perl -w

use strict;
use Tk;
use Tk::Photo;

my $mw = tkinit;

my $ico = $mw->Photo(-file=>"c:/myapp/icon.bmp");

$mw->iconimage($ico);

MainLoop;

HTH - Lynn.
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl Tk system button

2009-09-11 Thread Perez, Aaron P.
Try using GIMP @ http://www.gimp.org/. It might be a bit of overkill to
do it, but it will make xpm's.

 

--Aaron

 



From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
Spencer Chase
Sent: Friday, September 11, 2009 3:57 PM
To: Geoff Horsnell
Cc: perl-win32-users@listserv.activestate.com
Subject: Re: Perl Tk system button
Importance: Low

 

Greetings Geoff,

Searching the perl install folder for images, I come up with Tk.xpm in
perl/lib/tk which looks exactly like the re Tk my guess is that you can
change this to another xpm and give it the same name if you don't want
to find in which code the image is referenced to change it. good luck
finding an image editor that can save in xpm format. let me know if you
find one as I have wanted to do the same thing.

Friday, September 11, 2009, 3:02:46 PM, you wrote:

 

Is it possible to change the image in the system menu button (The red Tk
button in the top left hand corner of all GUI windows)? I would like to
add my own icon in place of this symbol.
 
Cheers
 
Geoff
 



-- 
Best regards,
Spencer Chasemailto:spen...@spencerserolls.com
<mailto:spen...@spencerserolls.com> 
67550 Bell Springs Rd.
Garberville,  CA 95542Postal service only.
Laytonville, CA 95454UPS only.
spen...@spencerserolls.com <mailto:spen...@spencerserolls.com> 
http://www.spencerserolls.com <http://www.spencerserolls.com> 
http://www.spencerserolls.com/MidiValve.htm
<http://www.spencerserolls.com/MidiValve.htm> 
(707) 984-8356


CONFIDENTIALITY STATEMENT. This email and any attachment is for the sole use of 
the intended recipient and may contain private, confidential and/or privileged 
information that may be subject to Hospira internal policies. If you are not 
the intended recipient, any dissemination, distribution or copying is strictly 
prohibited. If you have received this transmission in error, please notify 
Hospira immediately by return email or by email to 
privacypostmas...@hospira.com and delete the message and all copies and 
attachments from your system.
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perl Tk system button

2009-09-11 Thread Spencer Chase
Greetings Geoff,

Searching the perl install folder for images, I come up with Tk.xpm in 
perl/lib/tk which looks exactly like the re Tk my guess is that you can change 
this to another xpm and give it the same name if you don't want to find in 
which code the image is referenced to change it. good luck finding an image 
editor that can save in xpm format. let me know if you find one as I have 
wanted to do the same thing.

Friday, September 11, 2009, 3:02:46 PM, you wrote:

Is it possible to change the image in the system menu button (The red Tk button 
in the top left hand corner of all GUI windows)? I would like to add my own 
icon in place of this symbol.
 
Cheers
 
Geoff
 


-- 
Best regards,
Spencer Chasemailto:spen...@spencerserolls.com
67550 Bell Springs Rd.
Garberville,  CA 95542Postal service only.
Laytonville, CA 95454UPS only.
spen...@spencerserolls.com
http://www.spencerserolls.com
http://www.spencerserolls.com/MidiValve.htm
(707) 984-8356___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl TK Graying out disabled menu items

2007-01-26 Thread Chris Wagner
At 09:37 PM 1/10/2007 -0700, Jack D wrote:
>My mistake! You said you wanted the **Edit** menu disabled. Easy - just
>increase the index to 2. It is documented that the "pattern" search for
>indices needed work, so I would just keep track of your index numbers and
>use them instead. Here is the full code again which grays out the "Edit"
>menu. It works as advertised on WinXP Home/AS Build 819 ...
>
>

That code made the Edit item grayed out and clicking it did not drop down
the menu but the button was still depressable.  Not sure if that's supposed
to be that way.  One more annoyance was that the Tk window opened in the
background, it didn't float to the top of the desktop window pile.




--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede malis"

0100

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perl TK Graying out disabled menu items

2007-01-11 Thread Gary D Trosper
Problem Solved,

I found a machine with a later version of ActiveState Perl   (v5.8.7)

and everything worked as advertised.

Thanks to Jack D and Bill Luebkert for their timely help!

Gary Trosper
RTSC___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl TK Graying out disabled menu items

2007-01-10 Thread Jack D

 


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gary
D Trosper
Sent: Wednesday, January 10, 2007 9:20 PM
To: Jack D
Cc: 'Bill Luebkert'; perl-win32-users@listserv.ActiveState.com;
[EMAIL PROTECTED]
    Subject: RE: Perl TK Graying out disabled menu items


>Tried that, 

>The menu item was disabled but not grayed out. 

>Also the menubar seems to begin at 1 instead of 0 for its items; so
disabling 1 actually gets the 'File' menu. 

I think unless you explicitly state -tearoff=>0 - the first index is
reserved for the tearoff line. I know that doesn't make sense for a menubar
- but that is my guess anyways.

My mistake! You said you wanted the **Edit** menu disabled. Easy - just
increase the index to 2. It is documented that the "pattern" search for
indices needed work, so I would just keep track of your index numbers and
use them instead. Here is the full code again which grays out the "Edit"
menu. It works as advertised on WinXP Home/AS Build 819 ...


use strict;
use Tk;
my %menus;

my $mw = new MainWindow;
$mw->geometry("+200+200");
$mw->minsize(400,300);

my $menubar = $mw->Menu;
$mw->configure(-menu => $menubar);

foreach (qw/File Edit Help/) {
  $menus{$_} = $menubar->cascade(-label=>"~$_",-tearoff=>0);
}

$menus{'File'}->command(-label => "~New file");
$menus{'File'}->command(-label => "~Save file");
$menus{'File'}->command(-label => "E~xit", -command=>sub {$mw->destroy});


$menus{'Edit'}->command(-label=> "~Preferences");
$menus{'Edit'}->command(-label=> "File ~Editor");

$menus{'Help'}->command(-label=>"User ~Guide");
$menus{'Help'}->command(-label=>"~About");

$menubar->entryconfigure(2,-state=>'disabled');

MainLoop;



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl TK Graying out disabled menu items

2007-01-10 Thread Gary D Trosper
Tried that,

The menu item was disabled but not grayed out.

Also the menubar seems to begin at 1 instead of 0 for its items; so 
disabling 1 actually gets the 'File' menu.

I also tried just putting a command on the menubar
$menubar->command(-label=>"Test");
and disabled it thinking that it might behave differently than a cascade 
menu.

No Luck.

Gary T




"Jack D" <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
01/10/2007 07:23 PM

To
"'Gary D Trosper'" <[EMAIL PROTECTED]>, "'Bill Luebkert'" 
<[EMAIL PROTECTED]>
cc
perl-win32-users@listserv.ActiveState.com
Subject
RE: Perl TK Graying out disabled menu items






Add this line to the code I previously sent:
 
$menubar->entryconfigure(1,-state=>'disabled');
 
That should do it.
 
Jack

From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of 
Gary D Trosper
Sent: Wednesday, January 10, 2007 6:14 PM
To: Bill Luebkert
Cc: perl-win32-users@Listserv.ActiveState.com
Subject: Re: Perl TK Graying out disabled menu items


That grays out the last item in the Edit drop down menu. 
It doesn't gray out Edit itself. 

Still searching, 
Gary T 



Bill Luebkert <[EMAIL PROTECTED]> 
01/10/2007 05:08 PM 


To
Gary D Trosper <[EMAIL PROTECTED]> 
cc
perl-win32-users@Listserv.ActiveState.com 
Subject
Re: Perl TK Graying out disabled menu items








Gary D Trosper wrote:
> 
> Thanks Jack that works!
> 
> However, he said in frustration,   I'm trying to gray out 'Edit'  on the 

> main menubar.
> 
> Using the "tried and true" cut and paste method I slipped this line into 

> the end of your code (Your code works)
> 
> $menubar->entryconfigure('Edit', -state=>'disabled');

my $m = $menus{'Edit'}->cget(-menu);
$m->entryconfigure('last', -state => 'disabled');

> and I get "Bad name after Edit on line 31"
> 
> Still struggling but pointed in the right direction,

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl TK Graying out disabled menu items

2007-01-10 Thread Jack D
Add this line to the code I previously sent:
 
$menubar->entryconfigure(1,-state=>'disabled');
 
That should do it.
 
Jack


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gary
D Trosper
Sent: Wednesday, January 10, 2007 6:14 PM
To: Bill Luebkert
Cc: perl-win32-users@Listserv.ActiveState.com
Subject: Re: Perl TK Graying out disabled menu items



That grays out the last item in the Edit drop down menu. 
It doesn't gray out Edit itself. 

Still searching, 
Gary T 




Bill Luebkert <[EMAIL PROTECTED]> 


01/10/2007 05:08 PM 


To
Gary D Trosper <[EMAIL PROTECTED]> 

cc
perl-win32-users@Listserv.ActiveState.com 

Subject
Re: Perl TK Graying out disabled menu items






Gary D Trosper wrote:
> 
> Thanks Jack that works!
> 
> However, he said in frustration,   I'm trying to gray out 'Edit'  on the 
> main menubar.
> 
> Using the "tried and true" cut and paste method I slipped this line into 
> the end of your code (Your code works)
> 
> $menubar->entryconfigure('Edit', -state=>'disabled');

my $m = $menus{'Edit'}->cget(-menu);
$m->entryconfigure('last', -state => 'disabled');

> and I get "Bad name after Edit on line 31"
> 
> Still struggling but pointed in the right direction,




___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perl TK Graying out disabled menu items

2007-01-10 Thread Gary D Trosper
That grays out the last item in the Edit drop down menu.
It doesn't gray out Edit itself.

Still searching,
Gary T




Bill Luebkert <[EMAIL PROTECTED]> 
01/10/2007 05:08 PM

To
Gary D Trosper <[EMAIL PROTECTED]>
cc
perl-win32-users@Listserv.ActiveState.com
Subject
Re: Perl TK Graying out disabled menu items






Gary D Trosper wrote:
> 
> Thanks Jack that works!
> 
> However, he said in frustration,   I'm trying to gray out 'Edit'  on the 

> main menubar.
> 
> Using the "tried and true" cut and paste method I slipped this line into 

> the end of your code (Your code works)
> 
> $menubar->entryconfigure('Edit', -state=>'disabled');

my $m = $menus{'Edit'}->cget(-menu);
$m->entryconfigure('last', -state => 'disabled');

> and I get "Bad name after Edit on line 31"
> 
> Still struggling but pointed in the right direction,


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl TK Graying out disabled menu items

2007-01-10 Thread Gary D Trosper
Thanks Jack that works!

However, he said in frustration,   I'm trying to gray out 'Edit'  on the 
main menubar.

Using the "tried and true" cut and paste method I slipped this line into 
the end of your code (Your code works)

$menubar->entryconfigure('Edit', -state=>'disabled');

and I get "Bad name after Edit on line 31"

Still struggling but pointed in the right direction,

Gary T
RTSC




"Jack D" <[EMAIL PROTECTED]> 
01/10/2007 11:17 AM

To
"'Gary D Trosper'" <[EMAIL PROTECTED]>, 

cc

Subject
RE: Perl TK Graying out disabled menu items







 
 From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of 
Gary
D Trosper
 Sent: Wednesday, January 10, 2007 7:59 AM
 To: perl-win32-users@Listserv.ActiveState.com
 Subject: Perl TK Graying out disabled menu items
 
 
 Hi All, 
 
 I'm running ActiveState perl version 5.8.0 built for
MSWin32-86-multi-thread. 
 
 I would like to create a simple menubar with some 
-command items
disabled until programatical conditions are met. 
 (No problem been there done that.  Except that the button 
still
takes focus and presses even though nothing happens) 
 
 And I would like a visual cue ( letters grayed out) that 
the menu
button/command is disabled.  ( This is my PROBLEM ) 
 
 I've tried using -disabledforeground => 'gray75'  and get 
an error
that -disableforeground is not a valid option. 
 
 I've tried using both 
 
 my $menuCmd = $menubar->command(  yada-yada ); 
 
 and 
 
 my $menuCmd = $menubar->Menubutton( yada-yada); 
 
 Same error so I used DataDumper to look at the return 
from
$menuCmd->configure  sure enough no -disabledforeground . 
  ( I could have sworn both Learning and Mastering Perl/Tk 
listed
-disabledforeground as an inherited option) 
 
 So doing what any perlish person would do... I tried 
another way.  I
just tried to set the -foreground => 'gray75' 
 
 No complaints this time just nothing happened. No color 
change in
the lettering. Nothing. 
 
 After hours of digging through documentation, 
experimentation,
googling, and nose picking I have yet to come up with an answer. 
 
 Then I saw the BUGS section on the ActiveState 
documentation on menu

 "At present it isn't possible to use the option database 
to specify
values for the options to individual entries." 
 
 Does this mean I can't get there from here or is there 
some other
arcane formulae that I am missing? 
 
 Help me Mister Wizard!


The following code "grays out" the exit button - and it is disabled too. 
I'm
using the most recent version of Activestate perl.




use strict;
use Tk;
my %menus;

my $mw = new MainWindow;
$mw->geometry("+200+200");
$mw->minsize(400,300);

my $menubar = $mw->Menu;
$mw->configure(-menu => $menubar);

foreach (qw/File Edit Help/) {
  $menus{$_} = $menubar->cascade(-label=>"~$_",-tearoff=>0);
}

$menus{'File'}->command(-label => "~New file");
$menus{'File'}->command(-label => "~Save file");
$menus{'File'}->command(-label => "E~xit", -command=>sub {$mw->destroy});


$menus{'Edit'}->command(-label=> "~Preferences");
$menus{'Edit'}->command(-label=> "File ~Editor");

$menus{'Help'}->command(-label=>"User ~Guide");
$menus{'Help'}->command(-label=>"~About");

my $m = $menus{'File'}->cget(-menu);
$m->entryconfigure('last', -state=>'disabled');

MainLoop;



 
 On a different note can anybody tell me what the -tiled 
and
-disabledtile options do or are for?  Can't find them documented anywhere

I have never used either of them - but I recall that they didn't work on
Windows.




___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl TK Graying out disabled menu items

2007-01-10 Thread Jack D

 
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gary
D Trosper
Sent: Wednesday, January 10, 2007 7:59 AM
To: perl-win32-users@Listserv.ActiveState.com
Subject: Perl TK Graying out disabled menu items


Hi All, 

I'm running ActiveState perl version 5.8.0 built for
MSWin32-86-multi-thread. 

I would like to create a simple menubar with some -command items
disabled until programatical conditions are met.   
(No problem been there done that.  Except that the button still
takes focus and presses even though nothing happens) 

And I would like a visual cue ( letters grayed out) that the menu
button/command is disabled.  ( This is my PROBLEM ) 

I've tried using -disabledforeground => 'gray75'  and get an error
that -disableforeground is not a valid option. 

I've tried using both 

my $menuCmd = $menubar->command(  yada-yada ); 

and 

my $menuCmd = $menubar->Menubutton( yada-yada); 

Same error so I used DataDumper to look at the return from
$menuCmd->configure  sure enough no -disabledforeground . 
 ( I could have sworn both Learning and Mastering Perl/Tk listed
-disabledforeground as an inherited option) 

So doing what any perlish person would do... I tried another way.  I
just tried to set the -foreground => 'gray75'   

No complaints this time just nothing happened. No color change in
the lettering. Nothing. 

After hours of digging through documentation, experimentation,
googling, and nose picking I have yet to come up with an answer. 

Then I saw the BUGS section on the ActiveState documentation on menu

"At present it isn't possible to use the option database to specify
values for the options to individual entries." 

Does this mean I can't get there from here or is there some other
arcane formulae that I am missing? 

Help me Mister Wizard!


The following code "grays out" the exit button - and it is disabled too. I'm
using the most recent version of Activestate perl.




use strict;
use Tk;
my %menus;

my $mw = new MainWindow;
$mw->geometry("+200+200");
$mw->minsize(400,300);

my $menubar = $mw->Menu;
$mw->configure(-menu => $menubar);

foreach (qw/File Edit Help/) {
  $menus{$_} = $menubar->cascade(-label=>"~$_",-tearoff=>0);
}

$menus{'File'}->command(-label => "~New file");
$menus{'File'}->command(-label => "~Save file");
$menus{'File'}->command(-label => "E~xit", -command=>sub {$mw->destroy});


$menus{'Edit'}->command(-label=> "~Preferences");
$menus{'Edit'}->command(-label=> "File ~Editor");

$menus{'Help'}->command(-label=>"User ~Guide");
$menus{'Help'}->command(-label=>"~About");

my $m = $menus{'File'}->cget(-menu);
$m->entryconfigure('last', -state=>'disabled');

MainLoop;




On a different note can anybody tell me what the -tiled and
-disabledtile options do or are for?  Can't find them documented anywhere

I have never used either of them - but I recall that they didn't work on
Windows.



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl Tk and messageBox changes between ActiveState Perl releases

2006-08-18 Thread Lovett, Alan J
Thanks Rob,

I did as you suggested and raised an item in comp.lang.perl.tk.

Cheers, Alan 

-Original Message-
From: Sisyphus [mailto:[EMAIL PROTECTED] 
Sent: 18 August 2006 12:33
To: Lovett, Alan J; perl-win32-users@listserv.ActiveState.com
Subject: Re: Perl Tk and messageBox changes between ActiveState Perl
releases


- Original Message -
From: "Lovett, Alan J"
.
.
> 
> D:\Perl>type Tk_example_MessageBox.pl
>   use Tk;
>   my $mw = MainWindow->new;
>   my $doit = $mw->messageBox(
>   -title   => 'Please reply',
>   -message => 'Continue',
>   -type=> 'OKCancel',
>   -icon=> 'question',
>   -default => 'cancel'
>   );
>   print "Cancel   ($doit)\n"  if $doit ne 'ok';
>   print "Continue ($doit)\n"  if $doit eq 'ok';
> D:\Perl>perl Tk_example_MessageBox.pl(and select OK)
> Cancel   (Ok)
>
> i.e. once upon a time, messageBox returned 'ok', now it returns 'Ok'.
>
> I would like to be more exact about version numbers, but the problem 
> code that works was embedded via PerlApp more than a year ago, and its

> Perl environment is long gone.
>

I can narrow it down a little - somewhere between build 638 (perl 5.6.1,
which returned 'ok') and build 810 (perl 5.8.4, which returned 'Ok').

However, the *real* culprit is probably the version of Tk that is being
run.
AS build 810 (and later) runs Tk-804.027. AS build 638 runs Tk-800.024.
I have a perl 5.8.8 with Tk-800.024 and it returns 'ok' (same as  build
638) for that script.

I therefore submit that complaints should be sent to the Tk mailing
list, in general (and to Nick Ing-Simmons, in particular :-)

Cheers,
Rob

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perl Tk and messageBox changes between ActiveState Perl releases

2006-08-18 Thread Sisyphus

- Original Message - 
From: "Lovett, Alan J"
.
.
> 
> D:\Perl>type Tk_example_MessageBox.pl
>   use Tk;
>   my $mw = MainWindow->new;
>   my $doit = $mw->messageBox(
>   -title   => 'Please reply',
>   -message => 'Continue',
>   -type=> 'OKCancel',
>   -icon=> 'question',
>   -default => 'cancel'
>   );
>   print "Cancel   ($doit)\n"  if $doit ne 'ok';
>   print "Continue ($doit)\n"  if $doit eq 'ok';
> D:\Perl>perl Tk_example_MessageBox.pl(and select OK)
> Cancel   (Ok)
>
> i.e. once upon a time, messageBox returned 'ok', now it returns 'Ok'.
>
> I would like to be more exact about version numbers, but the problem
> code that works was embedded via PerlApp more than a year ago, and its
> Perl environment is long gone.
>

I can narrow it down a little - somewhere between build 638 (perl 5.6.1,
which returned 'ok') and build 810 (perl 5.8.4, which returned 'Ok').

However, the *real* culprit is probably the version of Tk that is being run.
AS build 810 (and later) runs Tk-804.027. AS build 638 runs Tk-800.024.
I have a perl 5.8.8 with Tk-800.024 and it returns 'ok' (same as  build 638)
for that script.

I therefore submit that complaints should be sent to the Tk mailing list, in
general (and to Nick Ing-Simmons, in particular :-)

Cheers,
Rob

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: perl Tk question

2005-06-01 Thread Zeray Abraha
Hi,
You are deleting whatever is in $text0 till the énd'.
Comment that out and you will see all the values of $i.

...

sub prg{
for (my $i=0;$i<20;$i++){
   #   $text0->delete('0.0','end');# commented out
   $text0->insert('end',"$i\n");
   #   sleep 1;
}
 }

Bye,
Zeray



|-+->
| | |
| | |
| | |
| | |
| | |
| |[EMAIL PROTECTED]  |
| | |
| |Sent by: |
| |[EMAIL PROTECTED]|
| |.com |
| | |
| |2005-06-01 10:06 AM  |
| |Please respond to synoptic   |
|-+->
  
>--|
  | 
 |
  |   To:   perl-win32-users@listserv.ActiveState.com   
 |
  |   cc:   (bcc: Zeray Abraha/WLR/SC/PHILIPS)  
 |
  |   Subject:perl Tk question  
 |
  | 
 |
  |   Classification:   
 |
  | 
 |
  | 
 |
  
>--|




Hi All!
In the following snippet:

use strict;
use Tk;
require Tk::LabFrame;
my $top = new MainWindow;
my $bar=$top->LabFrame(-label => 'buttons bar');
$bar->pack;
my $exi=$bar->Button(-command=>\&exi,-text=>'exit');
$exi->pack(-side=>'left');
my $prg=$bar->Button(-command=>\&prg,-text=>'prg');
$prg->pack(-side=>'left');
my $fr=$top->LabFrame();
$fr->configure(-height=>'5',-width=>"30");
$fr->pack(-fill=>'none');
my $text0=$fr->Text();
$text0->configure(-height=>'10',-width=>"20");
$text0->pack(-side=>'top',-fill=>'none');
MainLoop;
sub exi{
 $top->destroy;
 }
sub prg{
 for (my $i=0;$i<20;$i++){
 $text0->delete('0.0','end');
 $text0->insert('end',"$i\n");
 sleep 1;
 }
 }

When executing this snippet
I see in text0 only the last $i /in for cycle/
What I  must add to prg code
in order to see all cosequtive values of $i ?
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: perl Tk question

2005-06-01 Thread Darian Horn
Here you go

I took out your sleep and added a timer. Sleep will block tk handling events. 
The built in timer will not be blocked. So you will be able to do things like 
refresh the gui and move the window around the screen, etc. The '$top->update' 
is probably not required I just added it to force an update. Good thing about 
the timer, it handles starting and stopping a reaction to an event for you. 
Just remember to trip the alarm. Otherwise when your problem should end it will 
appear to hang. The bad thing is, I think that there is only one timer. I could 
be wrong but I do not think there is more than one. 

-Darian


use strict;
use Tk;
require Tk::LabFrame;
my $top = new MainWindow;
my $bar=$top->LabFrame(-label => 'buttons bar');
$bar->pack;
my $exi=$bar->Button(-command=>\&exi,-text=>'exit');
$exi->pack(-side=>'left');
my $prg=$bar->Button(-command=>\&prg,-text=>'prg');
$prg->pack(-side=>'left');
my $fr=$top->LabFrame();
$fr->configure(-height=>'5',-width=>"30");
$fr->pack(-fill=>'none');
my $text0=$fr->Text();
$text0->configure(-height=>'10',-width=>"20");
$text0->pack(-side=>'top',-fill=>'none');
my $alarm = 0;# added
my $counter = 0;  # added
my $counting = 0; # added
my $id;   # added
MainLoop;
sub exi{
if($counting) { $alarm++; } # added
$top->destroy;

}
sub prg{
$counter = 0;  # added
$counting = 1; # added
$id = $top->repeat(500, \&Timer); # added
$top->waitVariable($alarm);   # added
$top->afterCancel($id);   # added

#for (my $i=0;$i<20;$i++){
#   $text0->delete('0.0','end');
#   $text0->insert('end',"$i\n");
#   sleep 1;
#}
}
# added new function
sub Timer {

$text0->delete('0.0', 'end');
$text0->insert('end',sprintf("%02d", $counter++));
$top->update;
if($counter > 20) {
$alarm++;
$counting=0;
};
   }


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, June 01, 2005 3:07 AM
To: perl-win32-users@listserv.ActiveState.com
Subject: perl Tk question


Hi All!
In the following snippet:

use strict;
use Tk;
require Tk::LabFrame;
my $top = new MainWindow;
my $bar=$top->LabFrame(-label => 'buttons bar');
$bar->pack;
my $exi=$bar->Button(-command=>\&exi,-text=>'exit');
$exi->pack(-side=>'left');
my $prg=$bar->Button(-command=>\&prg,-text=>'prg');
$prg->pack(-side=>'left');
my $fr=$top->LabFrame();
$fr->configure(-height=>'5',-width=>"30");
$fr->pack(-fill=>'none');
my $text0=$fr->Text();
$text0->configure(-height=>'10',-width=>"20");
$text0->pack(-side=>'top',-fill=>'none');
MainLoop;
sub exi{
$top->destroy;
}
sub prg{
for (my $i=0;$i<20;$i++){
$text0->delete('0.0','end');
$text0->insert('end',"$i\n");
sleep 1;
}
}

When executing this snippet
I see in text0 only the last $i /in for cycle/
What I  must add to prg code
in order to see all cosequtive values of $i ?
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: perl Tk question

2005-06-01 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote:

> Hi All!
> In the following snippet:
> 
> use strict;
> use Tk;
> require Tk::LabFrame;
> my $top = new MainWindow;
> my $bar=$top->LabFrame(-label => 'buttons bar');
> $bar->pack;
> my $exi=$bar->Button(-command=>\&exi,-text=>'exit');
> $exi->pack(-side=>'left');
> my $prg=$bar->Button(-command=>\&prg,-text=>'prg');
> $prg->pack(-side=>'left');
> my $fr=$top->LabFrame();
> $fr->configure(-height=>'5',-width=>"30");
> $fr->pack(-fill=>'none');
> my $text0=$fr->Text();
> $text0->configure(-height=>'10',-width=>"20");
> $text0->pack(-side=>'top',-fill=>'none');
> MainLoop;
> sub exi{
>   $top->destroy;
>   }
> sub prg{
>   for (my $i=0;$i<20;$i++){
>   $text0->delete('0.0','end');
>   $text0->insert('end',"$i\n");
>   sleep 1;
>   }
>   }
> 
> When executing this snippet
> I see in text0 only the last $i /in for cycle/
> What I  must add to prg code
> in order to see all cosequtive values of $i ?

I believe it's becuase you're not getting back to MainLoop to update
the display.  You could put the prg sub on a timer and handle it that
way or force a screen update with '$text0->update;' in the prg loop.

-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--<  o // //  Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: perl Tk question

2005-06-01 Thread Anderson, Mark (Service Delivery)
Looks like it's just because the window doesn't update until you return from
the callback. Are you trying to create some sort of special effect? Perhaps
asking how to create that effect might be simpler - the Text widget doesn't
look like it likes that sort of thing!

Kind regards,

Mark Anderson
Service Improvement Programme
Level 2, 113 Dundas Street
Edinburgh, EH3 5DE
Tel: 0131 523 8786
Mob: 07808 826 063


> -Original Message-
> From: [EMAIL PROTECTED]
> [SMTP:[EMAIL PROTECTED]
> Sent: Wednesday, June 01, 2005 9:07 AM
> To:   perl-win32-users@listserv.ActiveState.com
> Subject:  perl Tk question
> 
> *** WARNING : This message originates from the Internet ***
> 
> Hi All!
> In the following snippet:
> 
> use strict;
> use Tk;
> require Tk::LabFrame;
> my $top = new MainWindow;
> my $bar=$top->LabFrame(-label => 'buttons bar');
> $bar->pack;
> my $exi=$bar->Button(-command=>\&exi,-text=>'exit');
> $exi->pack(-side=>'left');
> my $prg=$bar->Button(-command=>\&prg,-text=>'prg');
> $prg->pack(-side=>'left');
> my $fr=$top->LabFrame();
> $fr->configure(-height=>'5',-width=>"30");
> $fr->pack(-fill=>'none');
> my $text0=$fr->Text();
> $text0->configure(-height=>'10',-width=>"20");
> $text0->pack(-side=>'top',-fill=>'none');
> MainLoop;
> sub exi{
>   $top->destroy;
>   }
> sub prg{
>   for (my $i=0;$i<20;$i++){
>   $text0->delete('0.0','end');
>   $text0->insert('end',"$i\n");
>   sleep 1;
>   }
>   }
> 
> When executing this snippet
> I see in text0 only the last $i /in for cycle/
> What I  must add to prg code
> in order to see all cosequtive values of $i ?
> ___
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered 
Office: 36 St Andrew Square, Edinburgh EH2 2YB

The Royal Bank of Scotland plc is authorised and regulated by the Financial 
Services Authority and represents The Royal Bank of Scotland Marketing Group. 
The Bank sells life policies, collective investment schemes and pension 
products and advises only on the Marketing Group's range of these products and 
on a With-Profit Bond produced by Norwich Union Life (RBS) Limited.

This e-mail message is confidential and for use by the addressee only. If the 
message is received by anyone other than the addressee, please return the 
message to the sender by replying to it and then delete the message from your 
computer. Internet e-mails are not necessarily secure. The Royal Bank of 
Scotland plc does not accept responsibility for changes made to this message 
after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of viruses, 
it is the responsibility of the recipient to ensure that the onward 
transmission, opening or use of this message and any attachments will not 
adversely affect its systems or data. No responsibility is accepted by The 
Royal Bank of Scotland plc in this regard and the recipient should carry out 
such virus and other checks as it considers appropriate.

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: perl Tk question

2005-06-01 Thread BLAHA Jan
> When executing this snippet
> I see in text0 only the last $i /in for cycle/
> What I  must add to prg code
> in order to see all cosequtive values of $i ?

for (my $i=0;$i<20;$i++){
#$text0->delete('0.0','end'); # just don't delete everytime all
contents of the box
$text0->insert('end',"$i\n");
}

Regards,

Jan Blaha

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: perl Tk question

2005-06-01 Thread David TV
Just add:

$top->update

any place inside the "prg" procedure.

On Wed, 1 Jun 2005 08:06:42 UT, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi All!
> In the following snippet:
> 
> use strict;
> use Tk;
> require Tk::LabFrame;
> my $top = new MainWindow;
> my $bar=$top->LabFrame(-label => 'buttons bar');
> $bar->pack;
> my $exi=$bar->Button(-command=>\&exi,-text=>'exit');
> $exi->pack(-side=>'left');
> my $prg=$bar->Button(-command=>\&prg,-text=>'prg');
> $prg->pack(-side=>'left');
> my $fr=$top->LabFrame();
> $fr->configure(-height=>'5',-width=>"30");
> $fr->pack(-fill=>'none');
> my $text0=$fr->Text();
> $text0->configure(-height=>'10',-width=>"20");
> $text0->pack(-side=>'top',-fill=>'none');
> MainLoop;
> sub exi{
> $top->destroy;
> }
> sub prg{
> for (my $i=0;$i<20;$i++){
> $text0->delete('0.0','end');
> $text0->insert('end',"$i\n");
> sleep 1;
> }
> }
> 
> When executing this snippet
> I see in text0 only the last $i /in for cycle/
> What I  must add to prg code
> in order to see all cosequtive values of $i ?
> ___
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 


-- 
Un saludo,

#
   David TV
  E-Mail: [EMAIL PROTECTED] 
#

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: perl Tk question

2005-06-01 Thread Chris Wagner
Well right now ur deleting all the text before inserting any more.  Get rid
of the delete line or move it out of the for loop.  Then it'll work as expected.

At 08:06 AM 6/1/05 UT, [EMAIL PROTECTED] wrote:
>sub prg{
>   for (my $i=0;$i<20;$i++){
> $text0->delete('0.0','end');
> $text0->insert('end',"$i\n");
>   sleep 1;
>   }
>   }
>
>When executing this snippet
>I see in text0 only the last $i /in for cycle/
>What I  must add to prg code
>in order to see all cosequtive values of $i ?




--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede males"

0100

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl/Tk GUI Builder

2005-03-29 Thread h-taguchi
Arigatou,
(B
(BAnd I found ZooZ yesterday, it's cool!
(Bhttp://search.cpan.org/src/AQUMSIEH/ZooZ-1.1/ 
(B
(BRegards,
(BHirosi Taguti
(B[EMAIL PROTECTED]
(B 
(B
(B> -Original Message-
(B> From: [EMAIL PROTECTED] 
(B> [mailto:[EMAIL PROTECTED] On 
(B> Behalf Of Chris Wagner
(B> Sent: Tuesday, March 29, 2005 9:00 PM
(B> To: Perl-Win32-Users@listserv.ActiveState.com
(B> Subject: Re: Perl/Tk GUI Builder
(B> 
(B> Ohayo Taguchi-san.  I don't know of a builder app but there 
(B> is a great deal
(B> of information and examples contained in the widget.bat demo 
(B> that comes with
(B> Active Perl.  It should show u how to make any basic Tk GUI.
(B> 
(B> 
(B> 
(B> 
(B> 
(B> 
(B> --
(B> REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
(B> "...ne cede males"
(B> 
(B> 0100
(B> 
(B> ___
(B> Perl-Win32-Users mailing list
(B> Perl-Win32-Users@listserv.ActiveState.com
(B> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
(B> 
(B> 
(B___
(BPerl-Win32-Users mailing list
(BPerl-Win32-Users@listserv.ActiveState.com
(BTo unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: Perl/Tk GUI Builder

2005-03-29 Thread Jan Dubois
On Mon, 28 Mar 2005, [EMAIL PROTECTED] wrote:
> Does anyone know of a Perl/Tk GUI builder? I know it is asked before.
> But I like to know if there is. Guido seems not be supported any more.

Our "Komodo Professional" product includes a GUI builder that targets
Perl/Tk among others:

  http://aspn.activestate.com/ASPN/docs/Komodo/3.1/komodo-doc-guibuilder.html

You can download a trial version from the product website:

  http://www.activestate.com/Products/Komodo/

Note that the GUI builder is only part of the "Professional" edition and not
included in the "Personal" version.

Cheers,
-Jan


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perl/Tk GUI Builder

2005-03-29 Thread Chris Wagner
Ohayo Taguchi-san.  I don't know of a builder app but there is a great deal
of information and examples contained in the widget.bat demo that comes with
Active Perl.  It should show u how to make any basic Tk GUI.






--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede males"

0100

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: perl tk binding question

2005-03-11 Thread Jack D.
 
> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Swartwood, Larry H
> Sent: March 11, 2005 10:22 AM
> To: [EMAIL PROTECTED]; perl-win32-users@listserv.ActiveState.com
> Subject: RE: perl tk binding question
> 
> 
> I'm not sure why but when I change your binding to:
> 
>$li->bind('' =>\&li);
> 
> ...it works.

Because the 'active' index is not set until a button release also.

> 
> This site might explain it:
> http://www-users.cs.umn.edu/~amundson/perl/perltk/bind.htm
> 
> I don't have time to read it all right now.
> 
> --Larry S. 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of [EMAIL PROTECTED]
> Sent: Thursday, March 10, 2005 10:09 PM
> To: perl-win32-users@listserv.ActiveState.com
> Subject: perl tk binding question
> 
> i All!
> In following snippet
> I have 2 parallel arrays @list and @data and I want on 
> selecting entry in listbox to see corresponding data array 
> element in textbox using UP and DOWN arrows is OK but I have 
> to make 2 mouse clicks to make right selection!
> MY question - how to modify this scheme to made it work with 
> only one mouse click ?
> OR may be there other schemes ?
> and here is the snippet:
> ==
> use strict;
> use Tk;
> require Tk::LabFrame;
> my $top = new MainWindow;
> my $bar=$top->LabFrame(-label => 'buttons bar'); $bar->pack; 
> my $exi=$bar->Button(-command=>\&exi,-text=>'exit');
> $exi->pack(-side=>'left');
> my $fr=$top->LabFrame();
> $fr->configure(-height=>'5',-width=>"30");
> $fr->pack(-fill=>'none');
> my $li=$fr->Scrolled("Listbox");
> $li->configure(-height=>'20',-width=>"20");
> $li->pack(-side=>'left',-expand=>'no',-fill=>'none');
> my $text0=$fr->Text();
> $text0->configure(-height=>'10',-width=>"20");
> $text0->pack(-side=>'top',-fill=>'none');
> $li->bind('<1>' =>\&li);
> $li->bind('' =>\&li);
> $li->bind('' =>\&li);
> my @list=qw/one two three/;
> my @data=qw/data_one... data_two... data_three.../; 
> $li->delete(0,'end'); my %revers; my $i=0; foreach 
> (@list){$li->insert("end",$_);$revers{$_}=$i++}
> $li->focus;
> MainLoop;
> sub exi{
>   $top->destroy;
>   }
> 
> sub li{
>   my $sel=$li->get('active');
>   my $t=$data[$revers{$sel}];
>   $text0->delete('0.0','end');
>   $text0->insert ('0.0',$t) ;
> }
> 
> ___
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
> ___
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: perl tk binding question

2005-03-11 Thread Swartwood, Larry H

I'm not sure why but when I change your binding to:

   $li->bind('' =>\&li);

...it works.

This site might explain it:
http://www-users.cs.umn.edu/~amundson/perl/perltk/bind.htm

I don't have time to read it all right now.

--Larry S. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, March 10, 2005 10:09 PM
To: perl-win32-users@listserv.ActiveState.com
Subject: perl tk binding question

i All!
In following snippet 
I have 2 parallel arrays @list and @data
and I want on selecting entry in listbox 
to see corresponding data array element in textbox
using UP and DOWN arrows is OK
but I have to make 2 mouse clicks to make right selection!
MY question - how to modify this scheme 
to made it work with only one mouse click ?
OR may be there other schemes ?
and here is the snippet:
==
use strict;
use Tk;
require Tk::LabFrame;
my $top = new MainWindow;
my $bar=$top->LabFrame(-label => 'buttons bar');
$bar->pack;
my $exi=$bar->Button(-command=>\&exi,-text=>'exit');
$exi->pack(-side=>'left');
my $fr=$top->LabFrame();
$fr->configure(-height=>'5',-width=>"30");
$fr->pack(-fill=>'none');
my $li=$fr->Scrolled("Listbox");
$li->configure(-height=>'20',-width=>"20");
$li->pack(-side=>'left',-expand=>'no',-fill=>'none');
my $text0=$fr->Text();
$text0->configure(-height=>'10',-width=>"20");
$text0->pack(-side=>'top',-fill=>'none');
$li->bind('<1>' =>\&li);
$li->bind('' =>\&li);
$li->bind('' =>\&li);
my @list=qw/one two three/;
my @data=qw/data_one... data_two... data_three.../; 
$li->delete(0,'end');
my %revers;
my $i=0;
foreach (@list){$li->insert("end",$_);$revers{$_}=$i++}
$li->focus;
MainLoop;
sub exi{
$top->destroy;
}

sub li{
my $sel=$li->get('active');
my $t=$data[$revers{$sel}];
$text0->delete('0.0','end');
$text0->insert ('0.0',$t) ;
}

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: perl Tk font question

2004-07-13 Thread Michael Jung
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of [EMAIL PROTECTED]
> Sent: Tuesday, July 13, 2004 7:29 AM
> To: [EMAIL PROTECTED]
> Subject: perl Tk font question
>
>
> It may be simple but
> I can't figure how to set font
> in tk widget /my font is  cyrillic font/
> please help !
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
Don't remember where I found this.. It will give you a window so you can
select any installed font and set the font size.  The font is applied in
sub apply_font.

--mikej

  my $mw = MainWindow->new(-title => 'Font selection');
  my $f = $mw->Frame->pack(-side => 'top');

  my $family = 'Courier';
  my $be = $f->BrowseEntry(-label => 'Family:', -variable => \$family,
-browsecmd => sub { apply_font();})->pack(-fill => 'x', -side => 'left');
  $be->insert('end', sort $mw->fontFamilies);

  my $size = 10;
  my $bentry = $f->BrowseEntry(-label => 'Size:', -variable => \$size,
-browsecmd => sub { apply_font();})->pack(-side => 'left');
  $bentry->insert('end', (3 .. 32));

  sub apply_font {
$text->configure(-font =>
  [-family => $family,
   -size => $size]);
  }
}

--mikej
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: perl Tk font question

2004-07-13 Thread Schichmanter, EithanX
>It may be simple but
>I can't figure how to set font
>in tk widget /my font is  cyrillic font/
>please help !
>___

use Tk;
use strict;

my $top = MainWindow->new();
my $text = $top->Label(
-font => '{Courier New Cyr} 32', 
-text => 'Try me',)->pack();

MainLoop();



If your font name has more than one word in it, you need to put it
between braces like mentioned above.
32 is just the size of the font (put anything you like there...)

Works great on my end.
Make sure you have this font installed, and that your machine supports
cyrillic.

HTH


All the best,

Schichmanter Eitan
SDM Team Developer,
Petah-Tikva, Israel
Intel(r) 
[EMAIL PROTECTED]
phone: +972-3-9207046
--
 
Schichmanter Eitan,
CM Consultant and Developer,
LMB-Consulting LTD.
[EMAIL PROTECTED]
www.lmb.co.il


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl Tk

2004-05-27 Thread Eric Edwards
Jack D replied:
> 
> I am studying Tk using "Mastering Perl TK".  I found the below listed code
> in the book and got it working,
> 
>  Added some stuff to it and it seems to be working OK.  I wanted to add
> "$textundo->Save(?pathname?)
> 
> so that it saves the contents of the widget to a file.  I want this to
> happen when
> 
> I click on the "Save" button.  I have tried several things but can't get
> it to work.
> 
> Any help would be deeply appreciated.
> 
> The file path is "C:/save".

Well, if you want to use the Save method, then at a minimum you need to

use Tk::TextUndo;

I hope you are not expecting to be able to save the Entry widget data using
this method? If you wish to save that you will have to write your own
subroutine to "get" the input and save it separately.


> 
> #!/usr/bin/perl
> 
> use Tk;

 use Tk::TextUndo;

> $mw = MainWindow->new;
> $mw->title("Text: Data Entry");
> $f = $mw->Frame->pack(-side => 'bottom');
> $f->Button(-text => "Exit",
>-command => sub {exit;})->pack(-side => 'left');
> 
> $f->Button(-text => "Save",
>-command => sub { &print_rec;
> })->pack(-side => 'bottom');
> 
> $t = $mw->Scrolled("Text", -width => 40,

   $t = $mw->Scrolled("TextUndo", -width => 40,
> -wrap => 'none')->pack(-expand => 1, -fill =>
> 'both');
> foreach (qw/Name Address City State Zip Phone Occupation
>Company Business_Address Business_Phone/) {
>$w = $t->Label(-text => "$_:", -relief => 'groove', -width =>
> 20);
>$t->windowCreate('end', -window => $w);
>%info;
>$w = $t->Entry(-width => 20, -textvariable => \$info{$_});
>$t->windowCreate('end', -window => $w);
>$t->insert('end', "\n");
> }
> #$t->configure(-state => 'disabled');  # disallows user typing


> sub print_rec() {
>@key = keys %info;
>foreach $_ (@key) {
>   print "$_:$info{$_}\n";
>}
 $t->Save("C:/save.txt");
> }
> 
> MainLoop;
> 

Jack

Jack,
What I was trying to do was get an understanding of how to use and
Set up the "$textundo->Save(?pathname?)" method.  My book 
showed several of them but not how to set them up.
Thanks much for the info.
Eric
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl Tk

2004-05-27 Thread Eric Edwards
Beckett Richard replied:

It's not clear what you really want, but what about this...?

sub print_rec() {
   open (SAVE, ">>c:/save/data.txt");
   @key = keys %info;
   foreach $_ (@key) { 
  print "$_:$info{$_}\n";
  print SAVE "$_:$info{$_}\n"; 
   }
   close SAVE;
}   

R.
Richard,
This worked and did exactly what I wanted.  What I was 
trying to do was get an understanding of how to use and
Set up the "$textundo->Save(?pathname?)" method.  My book 
showed several of them but not how to set them up.
Thanks much for the info.
Eric

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Eric
Edwards
Sent: 27 May 2004 02:49
To: [EMAIL PROTECTED]
Subject: re:Perl Tk


Perl Tk Gurus,
I am studying Tk using "Mastering Perl TK".  I found the below listed code
in the book and got it working, 
 Added some stuff to it and it seems to be working OK.  I wanted to add
"$textundo->Save(?pathname?) 
so that it saves the contents of the widget to a file.  I want this to
happen when
I click on the "Save" button.  I have tried several things but can't get it
to work.  
Any help would be deeply appreciated.
The file path is "C:/save".
Thanks,
Eric
#!/usr/bin/perl
use Tk;
$mw = MainWindow->new;
$mw->title("Text: Data Entry");
$f = $mw->Frame->pack(-side => 'bottom');
$f->Button(-text => "Exit",
   -command => sub {exit;})->pack(-side => 'left');
$f->Button(-text => "Save",
   -command => sub { &print_rec; 
})->pack(-side => 'bottom');
$t = $mw->Scrolled("Text", -width => 40,
-wrap => 'none')->pack(-expand => 1, -fill =>
'both');
foreach (qw/Name Address City State Zip Phone Occupation
   Company Business_Address Business_Phone/) {
   $w = $t->Label(-text => "$_:", -relief => 'groove', -width =>
20);
   $t->windowCreate('end', -window => $w);
   %info;
   $w = $t->Entry(-width => 20, -textvariable => \$info{$_});
   $t->windowCreate('end', -window => $w);
   $t->insert('end', "\n");
}
#$t->configure(-state => 'disabled');  # disallows user typing
sub print_rec() {
   @key = keys %info;
   foreach $_ (@key) { 
  print "$_:$info{$_}\n";   
   }
}   
MainLoop; 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl Tk

2004-05-27 Thread Beckett Richard-qswi266
It's not clear what you really want, but what about this...?

sub print_rec() {
   open (SAVE, ">>c:/save/data.txt");
   @key = keys %info;
   foreach $_ (@key) { 
  print "$_:$info{$_}\n";
  print SAVE "$_:$info{$_}\n"; 
   }
   close SAVE;
}   

R.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Eric Edwards
Sent: 27 May 2004 02:49
To: [EMAIL PROTECTED]
Subject: re:Perl Tk


Perl Tk Gurus,
I am studying Tk using "Mastering Perl TK".  I found the below listed code in the book 
and got it working, 
 Added some stuff to it and it seems to be working OK.  I wanted to add  
"$textundo->Save(?pathname?) 
so that it saves the contents of the widget to a file.  I want this to happen when
I click on the "Save" button.  I have tried several things but can't get it to work.  
Any help would be deeply appreciated.
The file path is "C:/save".
Thanks,
Eric
#!/usr/bin/perl
use Tk;
$mw = MainWindow->new;
$mw->title("Text: Data Entry");
$f = $mw->Frame->pack(-side => 'bottom');
$f->Button(-text => "Exit",
   -command => sub {exit;})->pack(-side => 'left');
$f->Button(-text => "Save",
   -command => sub { &print_rec; 
})->pack(-side => 'bottom');
$t = $mw->Scrolled("Text", -width => 40,
-wrap => 'none')->pack(-expand => 1, -fill => 'both');
foreach (qw/Name Address City State Zip Phone Occupation
   Company Business_Address Business_Phone/) {
   $w = $t->Label(-text => "$_:", -relief => 'groove', -width => 20);
   $t->windowCreate('end', -window => $w);
   %info;
   $w = $t->Entry(-width => 20, -textvariable => \$info{$_});
   $t->windowCreate('end', -window => $w);
   $t->insert('end', "\n");
}
#$t->configure(-state => 'disabled');  # disallows user typing
sub print_rec() {
   @key = keys %info;
   foreach $_ (@key) { 
  print "$_:$info{$_}\n";   
   }
}   
MainLoop; 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl Tk

2004-05-26 Thread Jack D.


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:perl-
> [EMAIL PROTECTED] On Behalf Of Eric Edwards
> Sent: May 26, 2004 7:49 PM
> To: [EMAIL PROTECTED]
> Subject: re:Perl Tk
> 
> Perl Tk Gurus,
> 
> I am studying Tk using "Mastering Perl TK".  I found the below listed code
> in the book and got it working,
> 
>  Added some stuff to it and it seems to be working OK.  I wanted to add
> "$textundo->Save(?pathname?)
> 
> so that it saves the contents of the widget to a file.  I want this to
> happen when
> 
> I click on the "Save" button.  I have tried several things but can't get
> it to work.
> 
> Any help would be deeply appreciated.
> 
> The file path is "C:/save".

Well, if you want to use the Save method, then at a minimum you need to

use Tk::TextUndo;

I hope you are not expecting to be able to save the Entry widget data using
this method? If you wish to save that you will have to write your own
subroutine to "get" the input and save it separately.


> 
> #!/usr/bin/perl
> 
> use Tk;

 use Tk::TextUndo;

> $mw = MainWindow->new;
> $mw->title("Text: Data Entry");
> $f = $mw->Frame->pack(-side => 'bottom');
> $f->Button(-text => "Exit",
>-command => sub {exit;})->pack(-side => 'left');
> 
> $f->Button(-text => "Save",
>-command => sub { &print_rec;
> })->pack(-side => 'bottom');
> 
> $t = $mw->Scrolled("Text", -width => 40,

   $t = $mw->Scrolled("TextUndo", -width => 40,
> -wrap => 'none')->pack(-expand => 1, -fill =>
> 'both');
> foreach (qw/Name Address City State Zip Phone Occupation
>Company Business_Address Business_Phone/) {
>$w = $t->Label(-text => "$_:", -relief => 'groove', -width =>
> 20);
>$t->windowCreate('end', -window => $w);
>%info;
>$w = $t->Entry(-width => 20, -textvariable => \$info{$_});
>$t->windowCreate('end', -window => $w);
>$t->insert('end', "\n");
> }
> #$t->configure(-state => 'disabled');  # disallows user typing


> sub print_rec() {
>@key = keys %info;
>foreach $_ (@key) {
>   print "$_:$info{$_}\n";
>}
 $t->Save("C:/save.txt");
> }
> 
> MainLoop;
> 

Jack
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perl/TK

2003-06-17 Thread Elliot L. Tobin
Christopher,

my $frame = $main->Frame->pack; # capital Frame

And add $main->MainLoop;

Should work fine.

   - EllioT -

On Tue, 17 Jun 2003, Christopher Moss wrote:

::Can anyone help me with this fairly simple piece of Perl/Tk – actually
::I’ve taken it from the Man page and I can’t seem to get it to work! I
::simply added the call to create the main window.
::
::The script is as follows:
::
::.code
::
::use strict;
::use Tk::BrowseEntry;
::
::my $main = Tk::MainWindow->new;
::my $frame = $main->frame;
::my $var;
::my $b = $frame->BrowseEntry(-label =>"Label", -variable =>\$var);
::$b->insert("end", "opt1");
::$b->insert("end", "opt2");
::$b->insert("end", "opt3");
::$b->pack;
::
::.end code
::
::The error message I get is as follows:
::
::Can't call method "BrowseEntry" without a package or object reference at
::browse.pl line 7.
::
::
::I can't seem to find a reference to any object in the docs. Also I was
::assuming that using the use statement would deal with the package side
::of things, unless I've completely missed the point!
::
::TIA
::
::Chris
::
::Christopher Moss
::Murray McIntosh O'Brien
::Wellesley House
::204 London Road
::Waterlooville
::PO7 7AN
::
::(023) 9223 1006
::
::[EMAIL PROTECTED]
::
::
::
::---
::Outgoing mail is certified Virus Free.
::Checked by AVG anti-virus system (http://www.grisoft.com).
::Version: 6.0.483 / Virus Database: 279 - Release Date: 19/05/2003
::
::
::---
::Disclaimer
::
::Privileged or confidential information may be contained in this message.
::If you are not the addressee of this message please notify the sender
:: by return and delete it, and you may not use, copy, disclose or rely
:: on the information contained in it. Internet e-mail may be susceptible
::to data corruption, interception and unauthorised amendment for which
::Murray McIntosh O'Brien does not accept liability. Likewise whilst we
::have taken reasonable precautions to ensure that this e-mail and any
::attachments have been swept for viruses, Murray McIntosh O'Brien
::does not accept liability for any losses caused as a result of viruses.
::Statements in this message that do not relate to the business of Murray
::McIntosh O'Brien are neither given nor endorsed by it or the Directors
::of Murray McIntosh O'Brien. A list of the Directors of Murray McIntosh
::O'Brien is available for inspection at our offices.
::
::--
::
::___
::Perl-Win32-Users mailing list
::[EMAIL PROTECTED]
::To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
::
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Perl TK List?

2002-11-15 Thread Edwards, Mark \(CXO\)
Send mail to "[EMAIL PROTECTED]" with the following command
in the body of your email message:

subscribe ptk

-Original Message-
From: Scott Purcell [mailto:spurcell@;vertisinc.com] 
Sent: Friday, November 15, 2002 8:01 AM
To: [EMAIL PROTECTED]
Subject: Perl TK List?
Importance: Low


Hello,
I am doing a simple interface and I ran into a problem with a widget
method. Is there an appropriate list to post a question on perl/TK?

Thanks,

Scott Purcell | Developer | VERTIS | 555 Washington Ave. 4th Floor | St.
Louis, MO 63101 | T 314.588.0720 | F 314.588.0735 |
[EMAIL PROTECTED] | http://www.vertisinc.com

Vertis is a global powerhouse for integrated marketing and advertising
solutions that seamlessly combine advertising, direct marketing, media,
imaging and progressive technology. Vertis' products and services
include: consumer and media research, media planning and placement,
creative services, digital media production, targetable insert programs,
fully integrated direct marketing programs, circulation-building
newspaper products and eMarketing.



___
Perl-Win32-Users mailing list [EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Perl TK List?

2002-11-15 Thread gerhard . petrowitsch
a very good one is

[EMAIL PROTECTED]

You can get a member (via www.stanford.edu) or you can
also post a non-member question (takes longer to be answered).


Gerhard PetrowitschTel.: +49 8151 270 126
SP3D Chip Design GmbH FAX:  +49 8151 270 200
Petersbrunnerstr. 17  Home Office: +49 821 9069 741
82319 Starnberg, Germany  SERI: gerhard@DESTNSC1

Be like the ant.  When the ant gets a mixture of sand and sugar,
it selects only sugar; it neglects sand. See only good in others.
Pay no attention to the bad.(Sathya Sai Baba)




   
   
  
  "Scott Purcell"  
   
  
  <[EMAIL PROTECTED]> To:  
<[EMAIL PROTECTED]>
 
  Sent by: cc:  (bcc: 
Gerhard Petrowitsch/STN/SC/PHILIPS)
   
  [EMAIL PROTECTED] Subject:   Perl 
TK List?   
  
  veState.com  
   
  
   Classification: 
   
  
   
   
  
  15.11.2002 16:01 
   
  
   
   
  
   
   
  




Hello,
I am doing a simple interface and I ran into a problem with a widget method. Is there 
an appropriate list to post a question on perl/TK?

Thanks,

Scott Purcell | Developer | VERTIS | 555 Washington Ave. 4th Floor | St. Louis, MO 
63101 |
T 314.588.0720 | F 314.588.0735 | [EMAIL PROTECTED] | http://www.vertisinc.com

Vertis is a global powerhouse for integrated marketing and advertising solutions that 
seamlessly combine advertising, direct marketing, media, imaging and progressive 
technology. Vertis' products and services include: consumer and media research, media
planning and placement, creative services, digital media production, targetable insert 
programs, fully integrated direct marketing programs, circulation-building newspaper 
products and eMarketing.



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs




___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Perl TK List?

2002-11-15 Thread Chris Anderson
Original Message ---
Hello,
I am doing a simple interface and I ran into a problem with a widget method. Is there 
an appropriate list to post a question on perl/TK?

Thanks,

Scott Purcell 

Scott:

Whenever I had P/TK questions any of the Perl group I am subscribed to helped.

Also, so did the O'Rilly Books on it. ;-)

What is your question? Not that I am an expert on it, but other may be able to help!

Chris Anderson

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Perl TK question

2002-06-26 Thread Martin Moss

Win32::InternetExplorer::Window

Regards

Marty

- Original Message -
From: "Tillman, James" <[EMAIL PROTECTED]>
To: "'Martin Moss'" <[EMAIL PROTECTED]>; "Jack" <[EMAIL PROTECTED]>;
"Perl-Win32-Users" <[EMAIL PROTECTED]>
Sent: Wednesday, June 26, 2002 12:40 PM
Subject: RE: Perl TK question


> Marty:  What's the IE embedding module for Tk?  Do you remember?  I'd be
> really interested in seeing that!
>
> jpt
>
> > -Original Message-
> > From: Martin Moss [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 26, 2002 7:32 AM
> > To: Jack; Perl-Win32-Users
> > Subject: Re: Perl TK question
> >
> >
> > You could always launch an external browser? use Win32::Process
> > With the url entered in the text box.
> > there is also a set of modules around which allow you to
> > embed an internet
> > explorer browser in your app -it wasn't quite fully working
> > when I last
> > looked at it 8 months ago though:-(
> >
> > Marty
> > - Original Message -
> > From: "Jack" <[EMAIL PROTECTED]>
> > To: "Perl-Win32-Users" <[EMAIL PROTECTED]>
> > Sent: Wednesday, June 26, 2002 5:36 AM
> > Subject: Re: Perl TK question
> >
> >
> > > - Original Message -
> > > From: "Kevin" <[EMAIL PROTECTED]>
> > > To: "Perl-Win32-Users" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, June 25, 2002 1:08 PM
> > > Subject: Perl TK question
> > >
> > >
> > > > I basically need to develop a small application that will
> > have a textbox
> > to
> > > > enter a URL which will be loaded in a browser component
> > inside of the
> > > > application (IE component - can I use activeX?). When
> > minimized, the
> > > > application will run on the system tray.
> > > >
> > > > Is this possible with Perl/TK?
> > >
> > > Not without a lot of hassle ! I don't know much about
> > Win32::GUI - but I
> > would
> > > suggest it is the better route this time around. There is no 'true'
> > browser like
> > > features in any Tk module that I know of. There was one
> > written by Nick
> > > Ing-Simmons(I think back in 1999). I have not used it - but
> > it only had
> > the
> > > basics.
> > >
> > > A bonus with using Win32::GUI is the notifyicon (aka
> > systray) stuff is
> > built in
> > > (although to have it 'removed' from the taskbar ?still
> > might take some
> > > Win32::API magic?).
> > >
> > > Jack
> > > ___
> > > Perl-Win32-Users mailing list
> > > [EMAIL PROTECTED]
> > > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> > >
> >
> > ___
> > Perl-Win32-Users mailing list
> > [EMAIL PROTECTED]
> > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> >
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Perl TK question

2002-06-26 Thread Tillman, James

Marty:  What's the IE embedding module for Tk?  Do you remember?  I'd be
really interested in seeing that!

jpt

> -Original Message-
> From: Martin Moss [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 26, 2002 7:32 AM
> To: Jack; Perl-Win32-Users
> Subject: Re: Perl TK question
> 
> 
> You could always launch an external browser? use Win32::Process
> With the url entered in the text box.
> there is also a set of modules around which allow you to 
> embed an internet
> explorer browser in your app -it wasn't quite fully working 
> when I last
> looked at it 8 months ago though:-(
> 
> Marty
> - Original Message -
> From: "Jack" <[EMAIL PROTECTED]>
> To: "Perl-Win32-Users" <[EMAIL PROTECTED]>
> Sent: Wednesday, June 26, 2002 5:36 AM
> Subject: Re: Perl TK question
> 
> 
> > - Original Message -
> > From: "Kevin" <[EMAIL PROTECTED]>
> > To: "Perl-Win32-Users" <[EMAIL PROTECTED]>
> > Sent: Tuesday, June 25, 2002 1:08 PM
> > Subject: Perl TK question
> >
> >
> > > I basically need to develop a small application that will 
> have a textbox
> to
> > > enter a URL which will be loaded in a browser component 
> inside of the
> > > application (IE component - can I use activeX?). When 
> minimized, the
> > > application will run on the system tray.
> > >
> > > Is this possible with Perl/TK?
> >
> > Not without a lot of hassle ! I don't know much about 
> Win32::GUI - but I
> would
> > suggest it is the better route this time around. There is no 'true'
> browser like
> > features in any Tk module that I know of. There was one 
> written by Nick
> > Ing-Simmons(I think back in 1999). I have not used it - but 
> it only had
> the
> > basics.
> >
> > A bonus with using Win32::GUI is the notifyicon (aka 
> systray) stuff is
> built in
> > (although to have it 'removed' from the taskbar ?still 
> might take some
> > Win32::API magic?).
> >
> > Jack
> > ___
> > Perl-Win32-Users mailing list
> > [EMAIL PROTECTED]
> > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> >
> 
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Perl TK question

2002-06-26 Thread Martin Moss

You could always launch an external browser? use Win32::Process
With the url entered in the text box.
there is also a set of modules around which allow you to embed an internet
explorer browser in your app -it wasn't quite fully working when I last
looked at it 8 months ago though:-(

Marty
- Original Message -
From: "Jack" <[EMAIL PROTECTED]>
To: "Perl-Win32-Users" <[EMAIL PROTECTED]>
Sent: Wednesday, June 26, 2002 5:36 AM
Subject: Re: Perl TK question


> - Original Message -
> From: "Kevin" <[EMAIL PROTECTED]>
> To: "Perl-Win32-Users" <[EMAIL PROTECTED]>
> Sent: Tuesday, June 25, 2002 1:08 PM
> Subject: Perl TK question
>
>
> > I basically need to develop a small application that will have a textbox
to
> > enter a URL which will be loaded in a browser component inside of the
> > application (IE component - can I use activeX?). When minimized, the
> > application will run on the system tray.
> >
> > Is this possible with Perl/TK?
>
> Not without a lot of hassle ! I don't know much about Win32::GUI - but I
would
> suggest it is the better route this time around. There is no 'true'
browser like
> features in any Tk module that I know of. There was one written by Nick
> Ing-Simmons(I think back in 1999). I have not used it - but it only had
the
> basics.
>
> A bonus with using Win32::GUI is the notifyicon (aka systray) stuff is
built in
> (although to have it 'removed' from the taskbar ?still might take some
> Win32::API magic?).
>
> Jack
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Perl TK question

2002-06-25 Thread Joseph Youngquist

I'd suggest using Win32::GUI if your running on Win32 platforms.
I'd also suggest becoming familiar with win32::API.
There is a module that can import ActiveX but I'm not remembering the name
of it.  A search in the Win32::GUI list at source forge for ActiveX should
bring it up.
When I last played with it, it was still very, very new and "imbedding" the
control in my window was rather not what I expected.


I'm sure you *can* do what you want in TK...if I recall correctly there was
some people working on a browser component for Tk...a look in
groups.google.com for comp.lang.perl.tk might prove helpful.

hth,



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Kevin
Sent: Tuesday, June 25, 2002 2:09 PM
To: Perl-Win32-Users
Subject: Perl TK question


Hello,

I do not know much about the Perl/TK and before I begin learning it, I would
like to make sure it can do what I need. The application will be for Win32
platforms.

I basically need to develop a small application that will have a textbox to
enter a URL which will be loaded in a browser component inside of the
application (IE component - can I use activeX?). When minimized, the
application will run on the system tray.

Is this possible with Perl/TK?

thanks

--Kevin
[EMAIL PROTECTED]

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Perl/Tk fileevent

2002-03-25 Thread Carter A. Thompson


Thanks, Jack.   I have the Mastering Perl/Tk book and I've even
tried the examples.  It's just not working.  :-(   I sincerely appreciate
your input.

I'll look into some other options.

Cheers,

Carter.


Jack wrote:

>- Original Message -
>From: "Carter A. Thompson" <[EMAIL PROTECTED]>
>
>>I'm having some difficultly understanding how to use fileevent.  I have
>>Perl/TK script as a wrapper for a source control system command
>>and I'd like to catch the output of the command in a text window.  I've
>>read that the way to do this is use fileevent to signal that output is
>>available without blocking the application.  My problem is simply,
>>I don't know how to do that as I'm relatively new to Perl/Tk.
>>
>
>I strongly suggest buying Mastering Perl/Tk by Lidie and Walsh. Luckily -
>chapter 15 is available as a sample which covers fileevent.
>http://www.oreilly.com/catalog/mastperltk/chapter/ch15.html
>
>Note: I don't know of many people (if any) who have gotton fileevent to work
>properly on Win32. A suggested alternative can be found in the cplt archives
>using polling and pipes..
>
>http://groups.google.com/groups?hl=en&selm=a3fegq%24id6%40fidoii.CC.Lehigh.E
>DU&rnum=4
>
>Jack
>


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Perl/Tk fileevent

2002-03-25 Thread Jack

- Original Message -
From: "Carter A. Thompson" <[EMAIL PROTECTED]>

> I'm having some difficultly understanding how to use fileevent.  I have
> Perl/TK script as a wrapper for a source control system command
> and I'd like to catch the output of the command in a text window.  I've
> read that the way to do this is use fileevent to signal that output is
> available without blocking the application.  My problem is simply,
> I don't know how to do that as I'm relatively new to Perl/Tk.

I strongly suggest buying Mastering Perl/Tk by Lidie and Walsh. Luckily -
chapter 15 is available as a sample which covers fileevent.
http://www.oreilly.com/catalog/mastperltk/chapter/ch15.html

Note: I don't know of many people (if any) who have gotton fileevent to work
properly on Win32. A suggested alternative can be found in the cplt archives
using polling and pipes..

http://groups.google.com/groups?hl=en&selm=a3fegq%24id6%40fidoii.CC.Lehigh.E
DU&rnum=4

Jack
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: perl/TK Label widget not updating quirky problem????

2002-02-14 Thread John V. Pataki

some ideas not sure exactly what your issue is...

but...

sub gui_update {

  #... your changes to text and textvariables based on criteria (if this
then that,etc)
  $lb->update;

} # end sub

$lb->repeat(100,\&gui_update); # 100 milliseconds



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Martin Moss
Sent: Thursday, February 14, 2002 12:11 PM
To: Dunnigan,Jack [Edm]; [EMAIL PROTECTED]
Subject: RE: perl/TK Label widget not updating quirky problem


I got it working in some places, but when I call update in one of my
subroutines which is builing out the main window whilst the toplevel widget
which contains the $lb goes into a loop and never recovers.

It's all very weird:-)
I think it's because calling update trys to force everything else to process
first.

It solved the inital problem anyway

Marty


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Dunnigan,Jack [Edm]
> Sent: Thursday 14 February 2002 17:13
> To: 'Martin Moss'; [EMAIL PROTECTED]
> Subject: RE: perl/TK Label widget not updating quirky problem
>
>
> > -Original Message-
> > From: Martin Moss [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 14, 2002 5:31 AM
> > To: [EMAIL PROTECTED]
> > Subject: perl/TK Label widget not updating quirky problem
>
> > $lb->configure(-text=>"starting Application");
> > ##Code block
> > $lb->configure(-text=>"Building 2nd Window");
> > ##Code Block
> > #this code block builds the Main Window (including loading
> > graphics from the
> > internet)
> > $lb->configure(-text=>"Loading Data");
> > print STDERR "Loading Data";
> > &Load();#Subroutine which makes a call to the internet
> > and loads Data
> > print STDERR "Data Loaded";
> >
> >
> >
> > The problem I have is that the 1st 2 messages are displayed
> > correctly, but I
> > don't see the "Loading Data" Message until AFTER the
> > subroutine has been
> > executed. I just wondered if anybody else has seen this
> > behaviour before.
>
> I would stick with the -textvariable approach. It is much cleaner (im my
> opinion). An update is not needed 'if' you only change the widget 'once'
> within a subroutine. If you are using nested subs - then you probably want
> to call an update directly after you configure your widget (or
> better yet -
> adjust the variable tied via -textvariable :) )
>
> ###
> use Tk;
> use strict;
> my $var=0;
> my $lb=tkinit->Label(-textvariable=>\$var)->pack;
> $lb->repeat(100,sub{$var++});
> MainLoop;
> ###
>
> To force an update each time you update the label.
>
> $lb->configure("whatever");
> $lb->update;
>
> or
>
> $var="whatever";
> $lb->update;
>
> I would be extremely surprised if this does not work.
> Remember to call update - whenever you adjust the widget.
>
> Jack
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Perl/Tk Entry widget questions

2002-01-07 Thread Dunnigan,Jack [Edm]

If you are inserting something programmatically, then why not check it
before you insert  :)

Anyways, it doesn't do that for me? Run this script and tell me what it
does..

##
use Tk;
use Tk::LEntry;
use strict;

my $max=10;
my $status="HELLO";

my $mw=new MainWindow;
my $e=$mw->LEntry(
-width=>20,
-maxwidth=>$max)->pack;
my $l=$mw->Label(-textvariable=>\$status)->pack;
$mw->repeat(1000,\&checkinsert);
MainLoop;

sub checkinsert
{
my $length = int(rand(20));
$e->delete(0,'end');
$e->insert('end','X'x$length);
($length>$max)?($status="$length NOT Allowed"):($status=" ");
}
###

Jack

"The views expressed here are mine and do not reflect the official
position of my employer or the organization through which the Internet
was accessed".



-Original Message-
From: Adam Frielink [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 07, 2002 1:09 PM


As I read the code in the LEntry module, when you perform a
$LEntry->insert('end',@list), it should insert all the list and then
truncate backwards to the maxwidth.  My widget doesn't actually perform this
until I try to type/edit the LEntry again.

Am I not understanding the insert logic correctly?

Adam Frielink


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk Entry widget questions

2002-01-07 Thread Adam Frielink



> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Dunnigan,Jack [Edm]
>
>
> >-Original Message-
> >From: Adam Frielink [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, January 07, 2002 12:16 PM
>
> >Thanks Jack.  I guess I wasn't specific enough in my original post to say
> >that I cannot allow an entry of more than 75 characters and not an entry
> box
> >of 75 character width.  If I can't find it, I will email you.
>
> Your original post was quite specific and I fully understood what
> you meant.
> LEntry does exactly what you want. It will NOT allow you to insert
> characters beyond the maximum you set.

As I read the code in the LEntry module, when you perform a
$LEntry->insert('end',@list), it should insert all the list and then
truncate backwards to the maxwidth.  My widget doesn't actually perform this
until I try to type/edit the LEntry again.

Am I not understanding the insert logic correctly?

Adam Frielink


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk Entry widget questions

2002-01-07 Thread Dunnigan,Jack [Edm]

>-Original Message-
>From: Adam Frielink [mailto:[EMAIL PROTECTED]]
>Sent: Monday, January 07, 2002 12:16 PM

>Thanks Jack.  I guess I wasn't specific enough in my original post to say
>that I cannot allow an entry of more than 75 characters and not an entry
box
>of 75 character width.  If I can't find it, I will email you.

Your original post was quite specific and I fully understood what you meant.
LEntry does exactly what you want. It will NOT allow you to insert
characters beyond the maximum you set.

Jack
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk Entry widget questions

2002-01-07 Thread Adam Frielink

Thanks Jack.  I guess I wasn't specific enough in my original post to say
that I cannot allow an entry of more than 75 characters and not an entry box
of 75 character width.  If I can't find it, I will email you.

Adam Frielink
Tyco Plastics

> -Original Message-
> From: Dunnigan,Jack [Edm] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 07, 2002 2:08 PM
> To: 'Adam Frielink'; [EMAIL PROTECTED]
> Subject: RE: Perl/Tk Entry widget questions
>
>
> You will need to use -validatecommand -- or --
>
> Nick Ing-Simmons wrote a small package called LEntry (Limited?
> Entry) which
> does exactly this. It is derived from and ISA Tk::Entry. All it
> does is add
> a new option to the Entry configspecs called -maxwidth. Then overrides the
> insert method to check for the proper length.
>
> I can e-mail this to you offlist if you would like.
>
> Jack
> 
> "The views expressed here are mine and do not reflect the official
> position of my employer or the organization through which the Internet
> was accessed".
>
>
>
> -Original Message-
> From: Adam Frielink [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 07, 2002 12:00 PM
> To: [EMAIL PROTECTED]
> Subject: Perl/Tk Entry widget questions
>
>
> Greetings,
>
> Here is a simple one, does anyone know how to limit the length of a Entry
> widget in Tk to be no more than 75 characters?
>
> Will this require a Validate callback, or is there an option that can be
> setup when I create the Entry widget?
>
> Thanks,
>
> Adam Frielink
> Tyco Plastics
>
>
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
>


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk Entry widget questions

2002-01-07 Thread Swartwood, Larry H

Upon reading your question a second time, I think I misunderstood. I don't
see where Entry() supports a callback function. One way around that is to
test $my_var later:

if( length( $my_var) > 75)
{
   # Prompt the user to re-enter the value
   ...
}

Larry S.

-Original Message-
From: Swartwood, Larry H 
Sent: Monday, January 07, 2002 12:05 PM
To: 'Adam Frielink'; '[EMAIL PROTECTED]'
Subject: RE: Perl/Tk Entry widget questions


Oops. Forgot the all important pack(). Should be:
$entry->Entry( -textvariable => \$my_var, -width => 75)->pack();

Sorry,
Larry S.



-Original Message-
From: Swartwood, Larry H 
Sent: Monday, January 07, 2002 12:03 PM
To: 'Adam Frielink'; [EMAIL PROTECTED]
Subject: RE: Perl/Tk Entry widget questions


$entry->Entry( -textvariable => \$my_var, -width => 75);

http://w4.lns.cornell.edu/~pvhp/ptk/doc/

Larry S.

-Original Message-
From: Adam Frielink [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 07, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: Perl/Tk Entry widget questions


Greetings,

Here is a simple one, does anyone know how to limit the length of a Entry
widget in Tk to be no more than 75 characters?

Will this require a Validate callback, or is there an option that can be
setup when I create the Entry widget?

Thanks,

Adam Frielink
Tyco Plastics


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk Entry widget questions

2002-01-07 Thread Dunnigan,Jack [Edm]

You will need to use -validatecommand -- or --

Nick Ing-Simmons wrote a small package called LEntry (Limited? Entry) which
does exactly this. It is derived from and ISA Tk::Entry. All it does is add
a new option to the Entry configspecs called -maxwidth. Then overrides the
insert method to check for the proper length.

I can e-mail this to you offlist if you would like.

Jack

"The views expressed here are mine and do not reflect the official
position of my employer or the organization through which the Internet
was accessed".



-Original Message-
From: Adam Frielink [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 07, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: Perl/Tk Entry widget questions


Greetings,

Here is a simple one, does anyone know how to limit the length of a Entry
widget in Tk to be no more than 75 characters?

Will this require a Validate callback, or is there an option that can be
setup when I create the Entry widget?

Thanks,

Adam Frielink
Tyco Plastics


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk Entry widget questions

2002-01-07 Thread Tillman, James

> $entry->Entry( -textvariable => \$my_var, -width => 75);
> 
> http://w4.lns.cornell.edu/~pvhp/ptk/doc/

...where the documentation states:

Name: width 
Class: Width 
Configure Option: -width 

Specifies an integer value indicating the desired width of the entry window,
in average-size characters of the widget's font. If the value is less than
or equal to zero, the widget picks a size just large enough to hold its
current text. 



What the requester was asking for was a limitation on input, not display.

A validate callback is the way to go, I believe, as the poster mentioned.

jpt
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk Entry widget questions

2002-01-07 Thread Swartwood, Larry H

Oops. Forgot the all important pack(). Should be:
$entry->Entry( -textvariable => \$my_var, -width => 75)->pack();

Sorry,
Larry S.



-Original Message-
From: Swartwood, Larry H 
Sent: Monday, January 07, 2002 12:03 PM
To: 'Adam Frielink'; [EMAIL PROTECTED]
Subject: RE: Perl/Tk Entry widget questions


$entry->Entry( -textvariable => \$my_var, -width => 75);

http://w4.lns.cornell.edu/~pvhp/ptk/doc/

Larry S.

-Original Message-
From: Adam Frielink [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 07, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: Perl/Tk Entry widget questions


Greetings,

Here is a simple one, does anyone know how to limit the length of a Entry
widget in Tk to be no more than 75 characters?

Will this require a Validate callback, or is there an option that can be
setup when I create the Entry widget?

Thanks,

Adam Frielink
Tyco Plastics


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk Entry widget questions

2002-01-07 Thread Swartwood, Larry H

$entry->Entry( -textvariable => \$my_var, -width => 75);

http://w4.lns.cornell.edu/~pvhp/ptk/doc/

Larry S.

-Original Message-
From: Adam Frielink [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 07, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: Perl/Tk Entry widget questions


Greetings,

Here is a simple one, does anyone know how to limit the length of a Entry
widget in Tk to be no more than 75 characters?

Will this require a Validate callback, or is there an option that can be
setup when I create the Entry widget?

Thanks,

Adam Frielink
Tyco Plastics


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: perl tk UI editor

2001-11-30 Thread Marcus

On 30.11.01 at 13:48 Leo Johan Susanto wrote:
>Does any one know any good UI editor for Perl Tk?

Well, there's a new project on Sourceforge called Guido working on a
new Perl/Tk gui builder.

For now, I use SpecPerl/SpecTcl. See the Tcl website. It's at:
scriptics.com

Marcus


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk book

2001-10-10 Thread Will Ganz

The Advanced Perl Programming book for OReilly also has a good section on
Tk. In some people's opnion, it is better than the Perl/Tk book from the
same publisher. I have both and agree with their assessment.

If you have ever done anything with a Java GUI program, then you will notice
that the layout tools Tk are quite similar. If this is the case for you,
then The Advanced Perl Programming book might be a better buy for you. As
always, YMMV.

HTH,

Will

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Christopher Hahn
> Sent: Tuesday, October 09, 2001 10:14 PM
> To: Perl win32 email list (E-mail)
> Subject: Perl/Tk book
>
>
>
> Hello all,
>
> I was browsing around and noticed a Manning Publications
> book on Perl/Tk (ISBN=1884777937).
>
> But when I went to a good bookstore I found that it's
> publication had been cancelled:
>   http://www.booksmatter.com/book.asp?isbn=1884777937&cp=0
>
> Does anyone know why?  ...or whether this title might be
> published by some other house?
>
> Just curious.  There isn't really a good Perl/Tk book out
> there. (Sorry to admit it, but the Oreilly Perl/Tk book is
> probably the only one from them that I do not like)
>
> Take care,
>
> Christopher
>
> P.S. On the issue of the Perl + OLE + Office Automation
> that I poked around about earlier.  I wanted to report that
> there is a tool which will report on the methods and properties
> of an automation server, if it provides typelib information.
> It is called "OLEVW32.EXE".  I am still wanting to find a good
> book on the subject though
>
> --
> In our sleep, pain which cannot forget falls drop by
> drop upon the heart until, in our own despair, against
> our will, comes wisdom through the awful grace of God.
> Christopher Hahn: [EMAIL PROTECTED]
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
>

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk book

2001-10-10 Thread Tillman, James

> P.S. On the issue of the Perl + OLE + Office Automation
> that I poked around about earlier.  I wanted to report that
> there is a tool which will report on the methods and properties
> of an automation server, if it provides typelib information.
> It is called "OLEVW32.EXE".  I am still wanting to find a good
> book on the subject though

There's another one called XRay which provides much more readable output,
similar to VB's Object Browser, and can even save the information to a
formatted text file.  I forget where I picked it up (for some reason I'm
thinking the Crystal Reports web site for some crazy reason), but it was
freely available.  A search on Google would certainly turn it up.

jpt
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk application woes

2001-06-28 Thread Casey Williams

Yeah, Carl is right, you don't need Xwindows software.  So you're running
this on win2k?

try this exact script...

#Begin--

use Tk;

my $mw = MainWindow->new(-title => 'Hello World!!');
$mw->Button(-text => "Done!", -command => sub{exit})->pack();
MainLoop();

#End

For this script don't worry about the lines...

#!/usr/local/bin/perl -w\
use lib '/export/home/bwise/perl/lib/site_perl/5.005';

...that you had in your earlier script.

I don't see why having those in there would cause a problem, but I don't
think you *NEED* them in win2k.  (I'm not sure if they even do anything in
win2k, I'm sure someone else can comment on this).

If you don't see it, make sure you check your task bar, it could possibly be
behind some other window.

If that doesn't work, lemme know. :)

-Casey Williams

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Carl Jolley
Sent: Thursday, June 28, 2001 2:59 PM
To: byron wise
Cc: Casey Williams; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: Perl/Tk application woes


On Thu, 28 Jun 2001, byron wise wrote:

> Thanks Casey for your response.  I finally figured out what was wrong.  I
> didn't have an x-window display on my Win2000!!
> So I got a demo from www.xwin32.com
>
> Currently I'm playing with the O'Reilly Perl/Tk book.  I have one concern
> regarding the end user of any applications.
>
> It seems that the user (assuming they are running a windows OS) would have
> to download some x-window display and then using the x-window display
> execute the script from the command line.  In this situation,  I think
there
> are better alternatives for applications to be written in.  One such
> language would be Java.  Sure they need the JRE to execute the script but
> you can put the jar file on the network and they can run it from there.
> Plus, since it is running on their machine the response time to events and
> such is much faster than using an x-window.  These seem to be some short
> commings to Perl/Tk apps.
>
> Please enlighten me with your wisdom.
>

Tk running on Windows does not require the X-window software.

 [EMAIL PROTECTED] 
 All opinions are my own and not necessarily those of my employer 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk application woes

2001-06-28 Thread Adam Frielink

Byron, After reading your initial post, it seems you want to open a Tk
window through a Webbrowser?  Is that correct.  If so, I don't think Tk is
(or was ever) intended for that purpose.  Though, I could be very wrong.

Am I understanding your need properly?

If you are wanting to 'put a file on the network', I assume you will want to
create an application like Jack said.

Adam

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Carl Jolley
Sent: Thursday, June 28, 2001 2:59 PM
To: byron wise
Cc: Casey Williams; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: Perl/Tk application woes


On Thu, 28 Jun 2001, byron wise wrote:

> Thanks Casey for your response.  I finally figured out what was wrong.  I
> didn't have an x-window display on my Win2000!!
> So I got a demo from www.xwin32.com
>
> Currently I'm playing with the O'Reilly Perl/Tk book.  I have one concern
> regarding the end user of any applications.
>
> It seems that the user (assuming they are running a windows OS) would have
> to download some x-window display and then using the x-window display
> execute the script from the command line.  In this situation,  I think
there
> are better alternatives for applications to be written in.  One such
> language would be Java.  Sure they need the JRE to execute the script but
> you can put the jar file on the network and they can run it from there.
> Plus, since it is running on their machine the response time to events and
> such is much faster than using an x-window.  These seem to be some short
> commings to Perl/Tk apps.
>
> Please enlighten me with your wisdom.
>

Tk running on Windows does not require the X-window software.

 [EMAIL PROTECTED] 
 All opinions are my own and not necessarily those of my employer 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk application woes

2001-06-28 Thread Dunnigan,Jack [Edm]

You don't need an Xserver to run perl/Tk on Win32. The users would, however,
need perl and the Tk extension loaded onto their local machine. That's easy,
just download and install everything in 10 minutes from ActiveState!

Even if that isn't an option, you can still use some sort of perl2exe to
convert it into machine code for distribution. Albeit, it will be a much,
much bigger .exe than, say, a Delphi app. Another option (I think only for
N*X users though) is the netscape perl/tk plugin, which will allow the app
to be run within a netscape window.

BTW, you either run perl/Tk from the command line, or you can link the .pl
extension to run perl.exe on a double click in an explorer window.

Jack

PS..Yes, there are likely better options. But perl/Tk is easy, free and open
source. What could be better :-) 

-Original Message-
From: byron wise [mailto:[EMAIL PROTECTED]]


It seems that the user (assuming they are running a windows OS) would have
to download some x-window display and then using the x-window display
execute the script from the command line. 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk problem

2001-05-23 Thread Dunnigan,Jack [Edm]

use ROText;

instead

Jack

-Original Message-
From: Edwards, Mark (CXO) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 10:07 AM
To: Perl-Win32-Users (E-mail)
Subject: Perl/Tk problem


I have a script that displays text in a Text widget.  I want to be able to
highlight a portion of the text, Ctrl-C and Ctrl-V it to another window.
That's easy, works fine. Unfortunately, the text in the Text widget can also
be altered.  If I use -state=>"disabled", then it can't be changed but I
also can't highlight it.  Is there some other property like -edit=>"no"?

Mark Edwards
ITO Support Specialist V
FutureSourcingSM
> COMPAQ Global Services
Phone: (719) 592-5363 
Fax: (719)592-5870
Pager: (719) 279-2702
Email: [EMAIL PROTECTED]

Compaq Computer Corp.
301 Rockrimmon Blvd. South
Mail Stop: CXO01-3-N13
Colorado Springs, CO 80919-2398


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk problem

2001-05-23 Thread Edwards, Mark (CXO)

Well that was easy.  Thanks.

-Original Message-
From: Dunnigan,Jack [Edm] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 10:27 AM
To: Edwards, Mark (CXO); Perl-Win32-Users (E-mail)
Subject: RE: Perl/Tk problem


use ROText;

instead

Jack

-Original Message-
From: Edwards, Mark (CXO) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 10:07 AM
To: Perl-Win32-Users (E-mail)
Subject: Perl/Tk problem


I have a script that displays text in a Text widget.  I want to be able to
highlight a portion of the text, Ctrl-C and Ctrl-V it to another window.
That's easy, works fine. Unfortunately, the text in the Text widget can also
be altered.  If I use -state=>"disabled", then it can't be changed but I
also can't highlight it.  Is there some other property like -edit=>"no"?

Mark Edwards
ITO Support Specialist V
FutureSourcingSM
> COMPAQ Global Services
Phone: (719) 592-5363 
Fax: (719)592-5870
Pager: (719) 279-2702
Email: [EMAIL PROTECTED]

Compaq Computer Corp.
301 Rockrimmon Blvd. South
Mail Stop: CXO01-3-N13
Colorado Springs, CO 80919-2398


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk

2001-04-27 Thread Casey Williams

Good point!  BTW, is there a way to make buttons thinner, say, the same size
height, as the default entry?  I've tried playing with the height attributes
to no avail.

-Casey

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Rubinow, Larry
Sent: Friday, April 27, 2001 1:48 PM
To: Perl Users List
Subject: RE: Perl/Tk




Casey Williams wrote:
> Dunnigan,Jack [Edm] wrote:
>> Why not create two frames side by each: a button frame and an
>> entry frame.
>> Then, add the buttons to the bottom of the button frame and
>> add entries to
>> the bottom of the entry frame.
> Sure, that'll work too.  But may not be as flexible depending
> on what your
> gonna do later.

Actually, it won't work.  Not easily, anyway.  Buttons and entry fields have
different default heights; start piling them up in side-by-side frames and
they'll quickly get out of synch.  The one-horizontal-frame-per-control-pair
suggestion would be much easier to implement.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk

2001-04-27 Thread Rubinow, Larry



Casey Williams wrote:
> Dunnigan,Jack [Edm] wrote:
>> Why not create two frames side by each: a button frame and an 
>> entry frame.
>> Then, add the buttons to the bottom of the button frame and 
>> add entries to
>> the bottom of the entry frame.
> Sure, that'll work too.  But may not be as flexible depending 
> on what your
> gonna do later.

Actually, it won't work.  Not easily, anyway.  Buttons and entry fields have
different default heights; start piling them up in side-by-side frames and
they'll quickly get out of synch.  The one-horizontal-frame-per-control-pair
suggestion would be much easier to implement.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk

2001-04-27 Thread Dunnigan,Jack [Edm]

Ooopss that should have been "Entry" on the last line..you get the idea
anyways.


Why not create two frames side by each: a button frame and an entry frame.
Then, add the buttons to the bottom of the button frame and add entries to
the bottom of the entry frame.

##
$mainframe->$mw->Frame()->pack; #pack it where you want..
$buttonframe=$mainframe->Frame()->pack(-side='left',-anchor=>'w');
$entryframe=$mainframe->Frame()->pack(-side='right',-anchor=>'w'); # or left

sub createstuff
{
...
$newbutton=$buttonframe->Button()->pack(-side=>'bottom'); #or top
$newentry=$entryframe->Entry()->pack(-side=>'bottom'; #or top
...
}
###

Jack


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk

2001-04-27 Thread Casey Williams

Sure, that'll work too.  But may not be as flexible depending on what your
gonna do later.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Dunnigan,Jack [Edm]
Sent: Friday, April 27, 2001 1:21 PM
To: 'Adam Frielink'
Cc: Perl Users List
Subject: RE: Perl/Tk


Why not create two frames side by each: a button frame and an entry frame.
Then, add the buttons to the bottom of the button frame and add entries to
the bottom of the entry frame.

##
$mainframe->$mw->Frame()->pack; #pack it where you want..
$buttonframe=$mainframe->Frame()->pack(-side='left',-anchor=>'w');
$entryframe=$mainframe->Frame()->pack(-side='right',-anchor=>'w'); # or left

sub createstuff
{
...
$newbutton=$buttonframe->Button()->pack(-side=>'bottom'); #or top
$newentry=$entryframe->Button()->pack(-side=>'bottom'; #or top
...
}
###

Jack




-Original Message-
From: Adam Frielink [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 27, 2001 11:34 AM
To: Perl Users List
Subject: Perl/Tk


I am trying something and have hit a stumbling block.  Here is my code



$frame_button->{"$widget_name"} = $mw->Button(-text => "$widget_name",
  -command => sub {
redraw_options_frame('delete', $widget_name) });
$frame_entry->{"$widget_name"}  = $mw->Entry(-text => "$widget_name");

$frame_button->{"$widget_name"}->pack($frame_entry->{"$widget_name"},
  -in => $options_frame,
  -side => 'left',
  -anchor => 'e',
  -padx => 5,
  -pady => 4,
  );


My intention is to add a Button and an entry inside of a frame window.  I
want to allow the user the ability to dynamically add 5 buttons (and their
cooresponding entry widgets) to my frame.  The problem I have run into is
this.  I cannot get each pair horizontally across the screen, each on their
own individual row.  I would use grid(), but then I would have to redraw the
frame and all inside widgets eachtime.  pack() just handles it in an easy
fashion...

Here is a brief visual example.

**
||
||
||
||
||
**

With the combinations of side and anchor I have tried, I have gotten all the
widgets either horizontally or vertically in the frame.   Is it possible to
do this without the grid?

Adam Frielink
Tyco Plastics

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk beginner question...

2001-04-23 Thread Rubinow, Larry

Adam Frielink wrote:

> If anyone has the Learning Perl/Tk book, I am working through 
> the example on
> page 65.  I will include the script following.
> 
> My problem is that this routine as in the book doesn't work.  
> I can Disable
> the Exit button but re-enabling it doesn't work.  My print 
> statement returns
> the following:
> 
> ARRAY(0x1814af8)
> ARRAY(0x1814ad4)
> 
> Obviously, I get the first when I disable the Exit button, 
> the second when I
> attempt to re-enable it.  The problem is that my Exit button is never
> re-enabled.  If I continue to hit the 'Enable/Disable Exit' 
> button, those
> two value alternateendlessly.  So, I don't know where the 
> problem is found.
> 
> Any thoughts,
> 
> TIA,

Change the first line in the -command sub to 

my $state = $exit_b->cget(-state);

This retrieves the configuration info; the code example was mistakenly
setting it.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Perl/Tk

2001-03-12 Thread Christopher Hahn


Jack,

Thank you for looking, but what I was referring to
was the Tk console command. (I forget why, right now ;-)

This command "Removes the wish console from the display".
(or at least "console hide" does)

Even for Tcl/tk this is a windows+mac-only feature.

Christopher

P.S. BTW: The shell-app "TkCon" is very useful for testing
fragments, and such a thing for perl would be most cool.
(I just wnated to clarify my original comment)

P.P.S. The console command is rather new.  I did not find it
in my Ousterhout (the original book).

> -Original Message-
> From: Dunnigan,Jack [Edm] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 18, 2000 10:18 PM
> To: Christopher Hahn; Perl win32 email list (E-mail)
> Subject: RE: Perl/Tk
> 
> 
> A what? I had to do a search on the net to see what you were 
> talking about.
> 
> http://www.hobbs.wservice.com/tcl/script/tkcon/docs/demopic.gif
> 
> I didn't realize tcl/tk had this. Anyways, I haven't seen one 
> yet. There's
> always talk about (on the UNIX side) somehow emulating or capturing an
> 'xterm' but no one has stepped up to the plate.
> 
> Jack
> 
> 
> -Original Message-
> From: Christopher Hahn [mailto:[EMAIL PROTECTED]]
> Sent: October 18, 2000 5:45 PM
> To: Perl win32 email list (E-mail)
> Subject: Perl/Tk
> 
> 
> 
> Hello,
> 
> Is the Tk command "console" supported in Perl/Tk?
> 
> Thanks,
> 
> Christopher
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
> 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: perl tk VS win32 GUI

2000-12-09 Thread Marcus

On 09.12.00 at 09:50 Christopher Sagayam wrote:
>can somebody point to me the advantages and disadvantages of using
perl tk VS WIn32 GUI for perl GUI programming...

I was reading an old post about this just yesterday and to summarize:

Win32::GUI is beta, has little documentation so far, and platform
dependent - Win 32 only

Tk is stable, well documented, and platform independent (Unix, Windows,
and ?Mac?)

The above is _not_ based on my own experience. It is what somebody else
posted to this list, so maybe others have something to add, or correct?


Marcus Friedlaender


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users