f



how to change foreground color of text in text widget

hi,
i have a program in which i am reading from a file and displaying
contents of file in a text widgets
now on a particular event i read one line of text widget & i need to
change color of that line
same as it occurs during debugging a program
what i feel a tag has to be created
suppose .t is my text widget
..t tag configure color1 -foreground red
now how do i change color of the line which i have read and how to use
this tag if so

0
harishd (23)
3/9/2005 1:57:51 PM
comp.lang.tcl 23428 articles. 2 followers. Post Follow

1 Replies
940 Views

Similar Articles

[PageSpeed] 19

now i am able to do that
what i did is while inserting line in text widget i added diff tag
names to each line
and while reading each line i configured tag of that line with diff
color

0
harishd (23)
3/9/2005 3:06:39 PM
Reply:

Similar Artilces:

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

Text widget -foreground color
It appears that when passing $textwidget->configure(-foreground => 'red'); that it sets the foreground color for all existing and new text. Can I intermix colors within a text widget? -++**==--++**==--++**==--++**==--++**==--++**==--++**== 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 ...

Re: Scrolling text: Changing text color, etc.
Even though Paneled and AnimatorElements are not listed options for Animate (and they are highlighted in Red), they nevertheless work (at least on my platform version). This is very fragile since in a future version they could legitimately filter these unsanctioned options. Also, eliminating the appearance of the control requires that the cell be reevaluated for each sequencing of the animation. $Version 7.0 for Mac OS X x86 (64-bit) (February 19, 2009) Animate[Row[ RotateLeft[ Thread[ Style[ Characters["Calculus III, Pg 109 "], Bold, Red]], c...

text-text
Wondering how what I input to my UTF-8 terminal gets passed along through my patched [1] trn ... Cyrillic: А Б В Г Д Е Ж З И Й К Л М Н О П а б в г д е ж з и й к л м н о п IPA: ᴀ ᴁ ᴂ ᴃ ᴄ ᴅ ᴆ ᴇ ᴈ ᴉ ᴊ ᴋ ᴌ ᴍ ᴎ ᴏ ɀ Ɂ ɂ Ƀ Ʉ Ʌ Ɇ ɇ Ɉ ɉ Ɋ ɋ Ɍ ɍ Ɏ ɏ [1] https://groups.google.com/d/msg/comp.sys.raspberry-pi/7Z37Hdrm0DM/6aqD-reXFzAJ ...

text + text
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do this. And MS SQL Server too, I think (CMIIW). -- dave ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org Am Freitag, 8. Oktober 2004 12:57 schrieb David Garamond: > What is "text + text" supposed to do right now? Nothing. > What about making "text + text" as an equivalent for "text > || text"? Most strongly-typed programming languages do this. And MS SQL > Server too, I think (CMIIW). What would this gain except for bloat? It's not like SQL is utterly compatible with any programming language; users will still have to learn all the operators anyway. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match Peter Eisentraut wrote: >>What is "text + text" supposed to do right now? > > Nothing. Then are these bugs? (7.4.5 and 8.0.0beta1 give same results). Frankly, the current behaviour is quite strange to me. ------------------ =...

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

How to highlight (change background color) of selected text within a text area
I want to create a functionality to be able to highlight - change background color - of selected text in a text area. I also want to capture all of the selected text for further processing. If this is not possible in a textarea, then I use another element (like a <DIV>) basically I need to ba able to highlight multiple sections of a text and then display all of the highlighted text somewhere else. ...

Re: Text widget -foreground color #2
Richard, Yes, you have to use text tags. Check the perldoc for Tk::Text or MPTK book for some examples. If I have any examples I will send you a follow up mail with them. Mike At 03:16 PM 3/3/2004 -0500, Markham, Richard wrote: >It appears that when passing $textwidget->configure(-foreground => 'red'); >that it sets the foreground color for all existing and new text. Can I >intermix colors within a text widget? >-++**==--++**==--++**==--++**==--++**==--++**==--++**== >This message was posted through the Stanford campus mailing list >server. I...

Text Color in Copied Text
I use Mathematica for all my class notes, and occasionally copy things from code editors that use color to highlight different constructs. In an earlier version (probably 5.2) the color highlighting copied over when I pasted it into a Text cell, but now this doesn't happen - all b/w. I don't see any way around this. Any ideas? Thanks, Kevin ...

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

How to change fg color of specific words in a text widget
I need to change the foreground (or background) color to highlight only specific words in a scrollable text widget. Is there a way to embed formatting control codes (sort of like ansi escape codes) in the content of a text widget to cause this? Thanks Jim --- news://freenews.netfront.net/ - complaints: news@netfront.net --- You can tag the range of characters/words and then use the -foreground option on the tag. Read up the Tags section in the text widget man page. /Ashok On Feb 25, 7:00=A0am, James Littlefield <jameslittlefi...@verizon.net> wrote: > I need...

[Uniface-L] Change font/color of Tab Widgets Label Text
------=_Part_33067_21221276.1191487115495 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, We have many forms where Tab Widgets are used. Each of these have many tabs (upto 10 tabs per screen). We will like to give visual indication to mark thoes tabs which have data to be displayed (e.g. Out of 10 tabs there are 6 tabs with data to be displayed and 4 without data). So that user does not have to go to each tab and find out that there is no data/information on that tab. The best way would be to change the color of ...

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 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 Usman, Your solution is incorrect. The first character in a text index is 1.0, not 0. Usman Muzaffar wrote: > .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 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 > > >...

Show colored text on a text object
I have a chat program. The messages sent from users will be shown in different colors. What is the suitable object for that. The object should be scrollable. lrantisi wrote: > I have a chat program. > The messages sent from users will be shown in different colors. > What is the suitable object for that. Questions usually end in a question mark (e.g. '?') please use question marks in future. Most Swing components can render basic HTML, so that is one way to get colored text. For a more serious approach, it is probably better to use a JTextPane/JEditorPane and use a styled ...

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 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. What do you mean by "dumped"? Saved? -- Kevin Walzer Code by Kevin http://www.codebykevin.com 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 help a lot. > It's possible to write code to do this, but there's nothing built-in to Tk or available in tklib. -- Bryan Oakley http://www.tclscripting.com Russell E. Owen wrote: > Is there an easy way to reload information dumped from a text widget? > I'm trying to reproduce and repo...

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

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 a file from another widget > (button, etc.). Thanks set data [.textwidget get 1.0 end-1c] -- Bryan Oakley http://www.tclscripting.com On Sat, 01 Jul 2006 22:27:42 GMT Bryan Oakley <oakley@bardo.clearlight.com> wrote: > 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 a file from another widget > > (button, etc.). Thanks > > set data [.textwidget get 1.0 end-1c] > > -- > Bryan Oakley > http://www.tclscripting.com Thanks Bryan! That works. ...

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 NP7cLf7dMPvXeP7dNvrVlv7eOPrWlvvaevrYmP7gRP7gRf7gRv7iTf7iWf7jUf3hav7jVv7jV/7k YP7lYfzioPzjn/zjoP7ocvzkoP7oc/7pcf7pcvzlp/7pe/7pfP3mp/7si/7tjf/tkf/tkv7uj/3r tf3stf/voP/vo//woP/wof/wpf/wp/7xuf7xvP/zqv7xwf/zq/7yuf/zsP/zsf/zsv7yv//zs/7y xP/zuf/zu//1vP70zv/2vP/2wv/2w//3wv/20P/3zf/3zv/30P/4zv/5z//51P/51f/61f/61v/5 4v/63v/64v/73//85v/85//87f/87v/98v/+9v////////////////////////////////////// /////////////////////////////////////////////////////yH+GkNyZWF0ZWQgd2l0aCBH SU1QIG9uIGEgTWFjACH5BAEKAP8ALAAAAAAWABYAAAj+AP8JHEiwoMGDA3cUMfID4UEZVlBB+/YN miosNxwKHAIrXLlz6NCdMxduVhKHQXJVs7YN3Dhy4rhdw6bryMEYqYL9QiYtWzdv2qYtA2aMFQ6D YIg5s9Xr2DNq1KIl83WrGTM3BU9YEsYrFq0ID4YVczChlqxdyjaxIAhj0ahQplYZGIALl4ADrU6F GuWoBsEZcwRJ6kQKiA9Xr3oAKfVpEiE6OQi+4GLnz6NLnUCJEgXKUyZIge58oUEQRRU2FeAcekSp UiVKkRDJobDmiguCJJ6QgaKgySBGjRoxMtRkQZQxUkoQBEGECxshBBho4MGDQ4MCQth4QRKCYAYb U8JosNGDIUEAAAgw4GEThoqODQVFMMkiBg2bPYkU8XmDRkwXJyMclIIWaZhxRhlkkFHGGWa0scUK CEGgghqF9JFHHXXk0UchcbQggU...

changing text color
Hi: Kinda new to all this and am looking for a script that will do the following: I have a table. In one cell I have an image and in an adjacent cell some text. I'd like to be able to mouse over the image in the one cell and cause it to change the color of text in the other cell. Any help would be appreciated. Thanks, Abe ...

How Do You Change Color of Text
I can't believe I am asking this question, but I'm using the Font tool to enter text on top of a photo. I have looked absolutely EVERYWHERE, but I CANNOT find where you change the color, font etc of such text. Where in the WORLD is it at? Argh!!! LRH Hi... Larry R Harrison Jr wrote: > I can't believe I am asking this question, but I'm using the Font tool to > enter text on top of a photo. I have looked absolutely EVERYWHERE, but I > CANNOT find where you change the color, font etc of such text. > > Where in the WORLD is it at? Argh!!! > > LRH > ...

How Do You Change Color of Text
I can't believe I am asking this question, but I'm using the Font tool to enter text on top of a photo. I have looked absolutely EVERYWHERE, but I CANNOT find where you change the color, font etc of such text. Where in the WORLD is it at? Argh!!! LRH Hi... Larry R Harrison Jr wrote: > I can't believe I am asking this question, but I'm using the Font tool to > enter text on top of a photo. I have looked absolutely EVERYWHERE, but I > CANNOT find where you change the color, font etc of such text. > > Where in the WORLD is it at? Argh!!! > > LRH > ...

changing text color
Hi: Kinda new to all this and am looking for a script that will do the following: I have a table. In one cell I have an image and in an adjacent cell some text. I'd like to be able to mouse over the image in the one cell and cause it to change the color of text in the other cell. Any help would be appreciated. Thanks, Abe Apu Nahasapeenapetulan wrote on 04 mrt 2004 in comp.lang.java.javascript: > Kinda new to all this and am looking for a script that will do the > following: First I would try to follow netiquette and refrain from multiposting !! > I ha...

Web resources about - how to change foreground color of text in text widget - comp.lang.tcl

Sweet America, Pikes Peak Mounatin from Garden of the Gods Park, with Kissing Camels in the foreground ...
I am releasing this picture for any use, whether personal or commerical. This is my hometown and I love this mountain, Pikes Peak. This beauty ...

Instagram brings editing tools and more of your friends to the foreground
Photo captions and locations can now be edited after posting

foreground Archives - Android Police - Android News, Apps, Games, Phones, Tablets
... crazy technology to make your image-capture and sharing experience more automagical. Next on Google's list? Annoying reflections and foreground ...

Stay distracted: Keep Netflix video running in the foreground on your Mac
Sometimes, work is boring. You might need a distraction from whatever routine task you're doing on your Mac, like entering data into a spreadsheet ...

Portraying “The Foreground Tragedy” In Stephen Hawking’s Life: James Marsh
One of the key challenges in creating The Theory of Everything , the biopic about physicist Stephen Hawking and his wife, was figuring out how ...

In the foreground, a landscape of embers, left this morning by the “North Fire,” which prompted peop
In the foreground, a landscape of embers, left this morning by the “North Fire,” which prompted people to abandon their cars on the 15 freeway ...

Impending casino closures foreground Atlantic City’s great divide
The question facing Atlantic City, and a growing number of other communities around the United States, is where all the revenue goes.

Newport Film Fest a foreground for young filmmakers to find their audience
Newport Film Fest a foreground for young filmmakers to find their audience

Instagram brings editing tools and more of your friends to the foreground
A picture may be worth a thousand words, but it’s worth fewer with a lousy caption—and let’s not even get into hashtags—so Instagram is trying ...

[iOS9] You can now see how much time app's have been active in the foreground and background : apple
If you go to settings > battery and tap on the list of apps, you can now see the amount of time an app has been running on screen and in the... ...

Resources last updated: 3/13/2016 6:06:07 PM