f



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
>  , },
>  , |2
>  , ||
>  , particular
>  , Bottom:
> --a-=3D-t-g-i-
> --------the following could be unreadable @ 1145988711   :::=20
> 
> 
> 
> 
> 
> 
> 
> 
> jmcs3
> kind regards
> 
> this ..
>  - i probably could use the canvas for the color-thing .. as i write
> 
> any suggestions to solutions and widgets for the above problems ?
> 
> windows
> would become 'links' and by clicking them i would open up different
> also i would like to be able to detect certain sentences or words that
> 
> take  different background colors according to certain parameters
> for example i would like certain lines of text within the textwidget to
> 
>  - ?
> supported by the plain text widget itself
> add some functionalities that at first and second sight are not directly
> i have an application with a couple of text widgets but i would like to
> 
> 
> hello
> 
> 
> Subject: text in a widget, text-widget
> To: ptk@lists.stanford.edu
> Sent: Tuesday, April 25, 2006 11:12 AM
> On Behalf Of Johan Meskens CS3 jmcs3
> From: owner-ptk@lists.stanford.edu [mailto:owner-ptk@lists.stanford.edu]
> -----Original Message-----
> 
> MainLoop();
> 
> 
> background",['BLUE','RED']);
> $scrolled->insert('end',"Here is a blue text with red
> $scrolled->insert('end',"Here is a blue link\n",['BLUE','LINK']);
> $scrolled->insert('end',"Here is a green text\n",['GREEN']);
> 
> 
>                 );
> 
>                 -fill   =3D> 'x',
>                 -expand =3D> 1,
> $frame->pack(
> 
>                                         );
> 
>                                         -anchor =3D> 'n',
>                                         -side   =3D> 'left',
>                             )->pack(
> 
>                             -command =3D> sub { exit 0},
>                             -width   =3D> 5,
>                             -text    =3D> 'EXIT',
> my $exitB  =3D $frame->Button(
> 
> 3,);
> my $frame =3D $mainWindow->Frame( -relief =3D> 'ridge',-borderwidth =3D> =
> 
> "Hey you pushed the link")->Show()});
> =3D>
> $scrolled->tagBind('LINK',"<Button-1>",sub { $scrolled->Dialog(-text =
> $scrolled->tagConfigure('RED',-background =3D> 'red');
> $scrolled->tagConfigure('LINK',-underline =3D> 1);=20
> $scrolled->tagConfigure('BLUE',-foreground =3D> 'blue');=20
> #lets set up some color tags for text
> 
>                                                     );
> 
>                                                     -expand =3D> '0',
>                                                     -fill   =3D> 'both',
>                                         )->pack(
> 
> 
>                                         -height     =3D> $sc_height,
>                                         -width      =3D> $sc_width,
>                                         -wrap       =3D> 'none',
>                                         -background =3D> 'white',
>                                         -scrollbars =3D> 'se',
>                                         "Text",
> my $scrolled =3D  $mainWindow->Scrolled(
> 
> my $sc_height =3D 15;
> my $sc_width  =3D 100;
> 
> my $mainWindow =3D MainWindow->new(-title =3D> "Test Tags");
> 
> use Tk::Dialog;
> use Tk;
> use strict;
> 
> Mike
> 
> HTH=20
> 
> well as some other tags.
> Here this will give you an idea how to create a link in a text widget as
> 
> Johan,


that's fantastic mike !!
thank you
reverse jmcs3










--------the following could be unreadable @ 1145998973   ::: 
Aanmantucumanman
 , ,
 , dark
 , in
 , f(lrdg
 , SPOKEN
 , SSU
 , df
 , w
 , }
 , }
 , {
 , 




-++**==--++**==--++**==--++**==--++**==--++**==--++**==
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
Johan
4/25/2006 9:53:41 PM
comp.lang.perl.tk 4721 articles. 0 followers. pharrendorf (19) is leader. Post Follow

0 Replies
1012 Views

Similar Articles

[PageSpeed] 33

Reply:

Similar Artilces:

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 @ 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 => &...

text in a widget, text-widget
hello i have an application with a couple of text widgets but i would like to add some functionalities that at first and second sight are not directly supported by the plain text widget itself - ? for example i would like certain lines of text within the textwidget to take different background colors according to certain parameters also i would like to be able to detect certain sentences or words that would become 'links' and by clicking them i would open up different windows any suggestions to solutions and widgets for the above problems ? - i probably could...

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: 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: Confusing behavior regarding selected text in a text widget
This message is directed to whoever replied to my original post. I read it but it was deleted before I could reply. Thank you for your reply and explanation. I knew something was going on but didn't know that the text widget class binding would be triggered. I thought that overriding the widget instance would suffice. Something to learn about. Also, thanks for your observation on my "clipboard append" call- join should be used. By the way, your suggestions did the trick! Thanks again. Mike ...

highlight text in text widget
Hi, I am trying to make widget that displays text. I also want a search keywords available. The way I have envisioned is something similar to emacs search, i.e. it highlights all the occurrences of the keyword that you are interested in. I am trying to find out if that kind of highlighting be done in widget_text or some other widgets. Can anyone help? Thanks neon writes: > I am trying to make widget that displays text. I also want a search > keywords available. The way I have envisioned is something similar to > emacs search, i.e. it highlights all the occurrences of the keyword &g...

Re: (fwd) manipulating a derived Tk::Text widget
On Feb 3, 2005, at 3:07 PM, Steve Lidie wrote: > Hi, > > Yesterday a question was asked how to filter Control-g > characters from printing. > > Well Marc Dashevsky had posted an earlier solution where > he made a new text package like this: > > ####################################################33 > package Tk::MyText; > require Tk::Text; > use base qw/Tk::Text/; > Construct Tk::Widget 'MyText'; > > sub InsertKeypress { > my($w, $char) = @_; > if (ord($char) < 27) { > print chr(ord($char) | 0x40),...

Problem with tk text widget in displaying Chinese characters, entry widget works fine.
Hi, There seems to be a problem with tk text widget. I am able to edit and see the chinese characters in both entry widget and text widget. When I move from one character to another using arrow key or mouse, it works fine in entry; But in text, it simply mess up. The problem could be that chinese characters are 2 bytes long and cursor moves 1 byte. The text interpreter might be combining the other byte of Chinese character with the 2 bytes of next chinese character. Do I have to change some setting for text widget and/ or install some patch? Thanks, Vikas Vikas Gupta schrieb: > Hi, >...

tk text widget
Hi, See tk 4.2 file tkText.c: Tcl_AppendResult(interp, "bad switch \"", arg, "\": must be -forward, -backward, -exact, -regexp, ", "-nocase, -count, or --", (char *) NULL); return TCL_ERROR; ..... } else if ((c == 'f') && (strncmp(argv[i], "-forwards", length) == 0)) { backwards = 0; ..... hm , must be "-forward" , but writed "-forwards" also: tk 7.x tk 8.4.x tk 8.5.x ...... and see tk 8.6 file tkText.c: static const char *const switchStrings[] = { "--", "...

redirect text to file; text widget
I've loaded text from a file into the text widget, and having edited it would like to redirect it back into a file, but haven't found a handle for it. If there was an attribute such as the "-textvariable" option for the entry and label widgets, I could echo it into a file from another widget (button, etc). Thanks ..t get 0 end "John Peters" <john@jpeters.net> wrote in message news:20060701143102.70526542.john@jpeters.net... > > I've loaded text from a file into the text widget, and having edited it > would like to redirect it back into a fil...

redirect text to file from text widget
I'm looking for a handle for the text widget so that I can redirect edited text orginally loaded from a file back into a file. If there was an attribute like the "-textvariable" option in label and entry widgets, I could simply echo it into a file from another widget (button, etc.). Thanks John Peters wrote: > I'm looking for a handle for the text widget so that I can redirect > edited text orginally loaded from a file back into a file. If there > was an attribute like the "-textvariable" option in label and entry > widgets, I could simply echo it into...

Text widget
I'm trying to write a text editor with Tk::Text. The Tk::Text widget has a very sophisticated mechanisms using 'tags' for applying formatting (font, size, bold, etc) to the text in the widget. Is there any way to save this formatting when saving the text from the widget to a file? The Tk::TextUndo widget has the Save method - but it strips all tags out and just saves the plain text. I presume one needs a markup language of some sort to represent the tags - and when reading the file back in you apply the tags again. So ... a rich text widget in Tk? Any fancy wa...

Web resources about - Re: text in a widget, text-widget @ 1145998849 - comp.lang.perl.tk

Favorites Widget - Call & Text from the Notification Center on the App Store on iTunes
Get Favorites Widget - Call & Text from the Notification Center on the App Store. See screenshots and ratings, and read customer reviews.

Apple takes aim at the iOS 8 Notification Center widget from popular text capture app Drafts 4
Nearly three months after launching iOS 8, Apple is still fine tuning what developers can do with the new functionality.

App Watch: Plain old text and widgets
App Watch: Plain old text and widgets

Minimalist Text is Your All-in-one Widget Option
Is Minimalist Text the best minimalist app we’ve seen yet? That’s tough to say, but we definitely think it’s worth mentioning and giving a ton ...

7 Great text-based widgets, for those that would rather read their home screen
7 Great text-based widgets, for those that would rather read their home screen

Widget Watch: Mac ASCII Text with Figlet
Continuing on with what has turned into ASCII Sunday here at TUAW, a comment from Micah Cooper led me to FIGlet, which has been around roughly ...

Heapo Clipboard Management Widget - copy & paste text, photo and URL instantly also view, clear and sync ...
Get Heapo Clipboard Management Widget - copy & paste text, photo and URL instantly also view, clear and sync your clipboard with your desktop/mac/window ...

Apple takes aim at the iOS 8 Notification Center widget from popular text capture app Drafts 4
... decided that yet another iOS 8 Notification Center widget needs to be modified. Agile Tortoises Greg Pierce, developer of the popular text ...

Resources last updated: 2/6/2016 12:34:15 AM