f



Re: Scrolling in a text widget. #3

I put your code into this:

use Tk;

$mw = MainWindow->new;


my $t = $mw->Scrolled('Text')->pack;
   $t->bind("<4>", sub{ $t->yview('scroll', $t->cget(-height)*-.5, 'units')});
$t->bind("<5>", sub{ $t->yview('scroll', $t->cget(-height)*.5, 'units')});



MainLoop;


and it doesn't work. What did I do wrong? Thanks ~Brian Jennings

________________________________________________________________
The best thing to hit the Internet in years - Juno SpeedBand!
Surf the Web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@lists.stanford.edu
0
cj
5/11/2004 3:01:34 AM
comp.lang.perl.tk 4721 articles. 0 followers. pharrendorf (19) is leader. Post Follow

1 Replies
540 Views

Similar Articles

[PageSpeed] 7

cj.bj.bj@juno.com wrote:
> I put your code into this:
>
> use Tk;
>
> $mw = MainWindow->new;
>
>
> my $t = $mw->Scrolled('Text')->pack;
>    $t->bind("<4>", sub{ $t->yview('scroll', $t->cget(-height)*-.5,
> 'units')}); $t->bind("<5>", sub{ $t->yview('scroll',
> $t->cget(-height)*.5, 'units')});
>
>
>
> MainLoop;
>
>
> and it doesn't work. What did I do wrong? Thanks ~Brian Jennings
>

nothing that's linux/unix that binds key 4 and 5 of your mouse to scroll
events,
with windows you have the <MouseWheel> event:

    $t->bind('<MouseWheel>',
       [ sub { $_[0]->yview('scroll',-($_[1]/120)*3,'units') },
Tk::Ev("D")]);

But with the newest TK the text widgets scroll automaticly ...

-- 
Dieter D'Hoker
news:free.nl.dieter.dhoker & news:alt.nl.fan.dieter.dhoker
Multiplayer tetris? http://www.tsrv.com/


0
Dieter
5/11/2004 5:32:10 AM
Reply:

Similar Artilces:

RE: text in a widget, text-widget @ 1146167556 #3
Johan, Got to thinking about something that may work for you. Please see my modified code. Basically The only thing that I give it a is a list of words, the tag and tag bind is generated on the fly. Maybe using an approach like this will get you closer to what you wanted. Still kinda lame as you have to create a new tag for each word or in this case url but it at least will allow you to do it on the fly. Mike use strict; use Tk; use Tk::Dialog; my $mainWindow = MainWindow->new(-title => "Test Tags"); my $sc_width = 100; my $sc_height = 15; ...

RE: text in a widget, text-widget
You can use tags with in the text widget. See the documentation in Tk::Text for more explanation on how they work. How to configure: $scrolled->tagConfigure('BLUE',-background => 'blue'); $scrolled->tagConfigure('RED',-foreground => 'red'); $scrolled->tagConfigure('GREEN',-foreground => 'green'); Here is how I use them: $scrolled->insert('end',$job_header,'RED') if ($job_header); $scrolled->insert('end',$running_proc,'BLUE') if ($running_proc); $scro...

Re: text in a widget, text-widget @ 1145998849
Intrah onat Diria .. Tue, 25 Apr 2006 13:55:44 -0700 , ****** wrote "Revera y": > of "unsubscribe ptk" to majordomo@lists.stanford.edu > If you wish to unsubscribe from this mailing list, send the message body > This message was posted through the Stanford campus mailing list server. > ++**=3D=3D > -++**=3D=3D--++**=3D=3D--++**=3D=3D--++**=3D=3D--++**=3D=3D--++**=3D=3D--= > > > > > ,=20 > , _________________ > , |---| > , | > , lead > , ::::::opthe > , oo,loent,uaha > , }, > ,...

Re: text in a widget, text-widget @ 1146167556
Intrah onat Diria .. Tue, 25 Apr 2006 13:55:44 -0700 ,Van Nieuwenhuize, Mike wrote "Noalim y": > > Johan, > > Here this will give you an idea how to create a link in a text widget as > well as some other tags. > > HTH > > Mike > > use strict; > use Tk; > use Tk::Dialog; > > my $mainWindow = MainWindow->new(-title => "Test Tags"); > > my $sc_width = 100; > my $sc_height = 15; > > my $scrolled = $mainWindow->Scrolled( > ...

RE: text in a widget, text-widget #2
Johan, Here this will give you an idea how to create a link in a text widget as well as some other tags. HTH Mike use strict; use Tk; use Tk::Dialog; my $mainWindow = MainWindow->new(-title => "Test Tags"); my $sc_width = 100; my $sc_height = 15; my $scrolled = $mainWindow->Scrolled( "Text", -scrollbars => 'se', -background => 'white', -wrap => &...

Re: the better Perl/Tk book? (Re: Menu Creation) #3
On Thursday, Aug 21, 2003, at 20:38 US/Eastern, Tim Harsch wrote: > Well Steve is a list member and could give the definitive answer, but > from > what I gather they are the same book. It used to be called Learning > and for > the subsequent release it was renamed to mastering. So I guess the > real > question is, did the revision add value. I didn't read the first, but > I'd > be willing to bet the revision is a much better book. > As originally envisioned, there was to be a new, advanced, book, in addition to LPTK. And that was ...

Re: PATCH
>>> Steve Lidie 26-Oct-03 03:24 >>> : > [lusol@Ray:/usr/include/mach] diff -u mach.h.orig mach.h > --- mach.h.orig Sat Oct 25 22:53:40 2003 > +++ mach.h Sat Oct 25 22:54:29 2003 > @@ -76,7 +76,8 @@ > * Standard prototypes > */ > extern void panic_init(mach_port_t); > -extern void panic(const char *, ...); > +/*extern void panic(const char *, ...);*. I think this should be "*/" at the end of this line, not "*.". The way it stands, code from this &q...

Re: Scrolling in a text widget.
cj.bj.bj@juno.com wrote: > > Is there a way to be able to use a mouse scroller in a text widget? > Upgrade Perl/Tk to 800.025 or 804.027. Regards, Slaven -- __o Slaven Rezic _`\<,_ slaven <at> rezic <dot> de __(_)/ (_)____ ______________________________________________________________________________ -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the Stanford campus mailing list server. If you wish to unsubscribe from this mailing list, send the message body of "unsubscribe ptk" to m...

RE: text in a widget, text-widget @ 1146167556 #2
Not sure exactly what you are trying to do but it sounds like you want word that is clicked on. Quick and dirty way would be: $scrolled->selectWord(); my $word = $scrolled->getSelected(); The above will only get a single word, so would be a challenge if you have a link with multiple words. Lame way: create a separate tag for each word and bind that to a sub for that particular word. These seems like a lot of overhead and I would imagine Text widget would have better feature you can leverage on. Efficient way: ? I will leave that up to you ;) or someone else mor...

Re: Perl/tk executables #3
Hi Vikram, You can use "perl2exe". Regards Prabhanjan > From: "Vikram Khurana" <vkhurana@mail.nmfs.hawaii.edu> > To: <ptk@lists.stanford.edu> > Subject: Perl/tk executables > Date: Tue, 18 May 2004 11:38:37 -1000 > X-Priority: 3 (Normal) > X-MSMail-Priority: Normal > Importance: Normal > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 > X-pstn-levels: (S:99.90000/99.90000 R:95.9108 P:95.9108 M:100.0000 C:66.9133 ) > X-Received: By mailgate.Cadence.COM as PAA23687 at Tue May 18 15:42:04 2004 > &g...

Re: Perl/Tk on Tiger #3
Lidie Steve wrote: > > On May 3, 2005, at 5:03 PM, Dean Arnold wrote: > >> Steve Lidie wrote: >> >>> Macintosh users FYI, Perl and Tk build, test and install perfectly >>> on Mac OS X 10.4.0 Tiger. >>> >>> >> >> Is that native, or via X windows ? > > > Sorry, X11. > >> (Please give me a reason to upgrade!) >> > > One word: Spotlight > > Or: filesystem metadata, smart folders, H.264, security ... http:// > www.apple.com/macosx/newfeatures/over200.html &...

Re: Scrolling in a text widget. #4
Cj Bj Bj <cj.bj.bj@juno.com> writes: >I put your code into this: > >use Tk; > >$mw = MainWindow->new; > > >my $t = $mw->Scrolled('Text')->pack; > $t->bind("<4>", sub{ $t->yview('scroll', $t->cget(-height)*-.5, 'units')}); >$t->bind("<5>", sub{ $t->yview('scroll', $t->cget(-height)*.5, 'units')}); > > Are you on X or windows? If X does mouse scroll work for non-Tk applications? If not then for XFree86 (linux etc.) you need to define wh...

Re: Scrolling in a text widget. #2
On Mon, 10 May 2004 slaven@rezic.de wrote: > cj.bj.bj@juno.com wrote: > > > > Is there a way to be able to use a mouse scroller in a text widget? > > > > Upgrade Perl/Tk to 800.025 or 804.027. > or my $t = $top->Scrolled('Text')->pack; $t->bind("<4>", sub{ $t->yview('scroll', $t->cget(-height)*-.5, 'units')}); $t->bind("<5>", sub{ $t->yview('scroll', $t->cget(-height)*.5, 'units')}); -- Ondrej Koala Vacha -++**==--++**==--++**==--++**==--+...

Re: Perl/Tk Antialiasing #3
Bill Atkins <mer@batkins.com> writes: >Awesome! It's working excellently. Thanks for the link. > >Also, I don't know if this is a final release or not, Nope, you have a pre-public alpha snapshot. With luck a public alpha/beta will go out in next week or so, with it becoming a real release when "we" are confident it is as good as Tk800 series. >but I've been having >a bit of a problem with Text widgets. Basically, I have a Text widget >with a few tags. Some of these tags change the background colors of their >ranges. This i...

Web resources about - Re: Scrolling in a text widget. #3 - comp.lang.perl.tk

Scrolling - Wikipedia, the free encyclopedia
In computer displays , filmmaking , television production , and other kinetic displays, scrolling is sliding text, images or video across a monitor ...

Platform update: infinite scrolling, stream filters, user support, more
Facebook’s latest platform update includes infinite scrolling for the apps and games dashboard and API support for News Feed filters. The company ...

ScrollIt: display scrolling messages with emoticons on the App Store on iTunes
Get ScrollIt: display scrolling messages with emoticons on the App Store. See screenshots and ratings, and read customer reviews.

Google AdSense Ads Scrolling Now Default? - Flickr - Photo Sharing!
More at www.seroundtable.com/archives/016753.html

Apple iPhone 5 scrolling glitch demo - YouTube
The iPhone 5 has for the most part proved that the hardware and software at work are robust and efficient. Sure Apple Maps has caused people ...

Google updates Chrome for Android with better scrolling, pinch-zooming, audio playback, and HTML5 support ...
Google just update its Chrome app for Android. The latest version hit Google Play on Wednesday afternoon and notably includes improved scrolling ...

Tweetbot for Mac updated with smoother scrolling, quick-reply via notifications
... out a notable update for their popular Tweetbot for Mac Twitter client . The update brings a number of fixing, and also adds smoother scrolling ...

Samsung Galaxy S IV to feature 'eye scrolling', report says
Samsung's next Galaxy smartphone might be controlled by nothing more than the user's eyes, according to a new report in advance of its March ...

One Hero Parallax Scrolling Cool
Parallax scrolling sites are the new (old) cool (and very annoying sites on mobile devices) but very few actually combine the tech of px scrolling ...

Silent Film Festival's Trailers Use Instagram Scrolling to Simulate Look of Old Movies - Adweek
... in practice. The flipbook-style fusion of old and new technologies is a cool concept (check out the trailers here, here and here), but scrolling ...

Resources last updated: 2/7/2016 8:19:11 AM