f



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 use the canvas for the color-thing .. as i write this ..

kind regards
jmcs3








--------the following could be unreadable @ 1145988711   ::: 
--a-=-t-g-i-
 , Bottom:
 , particular
 , ||
 , |2
 , },
 , oo,loent,uaha
 , ::::::opthe
 , lead
 , |
 , |---|
 , _________________
 , 




-++**==--++**==--++**==--++**==--++**==--++**==--++**==
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 7:08:11 PM
comp.lang.perl.tk 4721 articles. 0 followers. pharrendorf (19) is leader. Post Follow

0 Replies
1133 Views

Similar Articles

[PageSpeed] 32

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 #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: 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 @ 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 #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 @ 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...

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...

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[] = { "--", "...

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...

Replace text with image in text widget
I'm trying to replace an emoticon with an actual image in a text widget. I know I'm not doing this correctly: the sample code below inserts two images randomly and seems to garble the text in other ways. The idea is to have two emoticons (one on each line) and replace them with an image, nothing more. Can anyone take a look and suggest how I might get this to work? Thanks. --- SPfHZvvOGvfQEvfGdvjQE/rNMfrOMfrNPfvQHfzQHfjQLfrNRvjQL/vRJfzRJvrOWvbMh/3VHPfM h/3WHPzVMP7XF/zVMfrPdv7YGP7YG/7YHPzWPPzWPfvUVP7ZHf7ZIPvWVf7aJv7aJ/7bJv7bM/7b NP7cLf7dMPvXeP7dNvrVlv7eOPrWlvvaevrYmP7gRP7gRf7gRv7i...

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...

copying text from table or text widgets
Hello everybody, Can anyone help me on how to copy text from table and text widgets for instance using ctrl+c, to paste the data into notepad or any editor. Thank you, Prashanth ...

text widget: loading dumped text?
Is there an easy way to reload information dumped from a text widget? I'm trying to reproduce and report a bug in the text widget and this would help a lot. -- Russell P.S. the bug is that in Aqua 8.4.15 if I scroll to the top of the text widget while some text is elided, often a few lines that *should* be displayed are simply blank. It's fairly reproducible but the data is rather complex. Russell E. Owen wrote: > Is there an easy way to reload information dumped from a text widget? > I'm trying to reproduce and report a bug in the text widget and this > would he...

Web resources about - text in a widget, text-widget - 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:35:39 AM