# Question concerning TkText list

**URL:** <https://www.ruby-forum.com/t/question-concerning-tktext-list/141334>\
**Category:** Ruby\
**Created:** [June 24, 2008, 7:08pm UTC](https://www.ruby-forum.com/t/question-concerning-tktext-list/141334 "2008-06-24T19:08:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubyman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecc23a/32.png) [@rubyman](https://www.ruby-forum.com/u/rubyman)\
**Post date:** [June 24, 2008, 7:08pm UTC](https://www.ruby-forum.com/t/question-concerning-tktext-list/141334/1 "2008-06-24T19:08:21Z")

</div>

Hello,

I have implemented a list using TkText that holds a list of sales tax  
rates.  
I am comparing this list to a list of other rates, which is also  
implemented  
via a TkText widget. I was wondering how to highlight the rates (using a  
different color) in the list that differ from the rates in the other  
list. I  
am aware of TkList, but did not want to go that route on this project.

Any help would be appreciated.

Thank You,

Harry

---

<div class="post-metadata">

**Author:** ![rubyman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecc23a/32.png) [@rubyman](https://www.ruby-forum.com/u/rubyman)\
**Post date:** [June 25, 2008, 8:00am UTC](https://www.ruby-forum.com/t/question-concerning-tktext-list/141334/2 "2008-06-25T08:00:17Z")

</div>

From: “Harry T.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Question concerning TkText list  
Date: Wed, 25 Jun 2008 02:03:23 +0900  
Message-ID: [002501c8d61c$72a31d60$removed\_email\_address@domain.invalid](mailto:002501c8d61c$72a31d60$removed_email_address@domain.invalid)

> I have implemented a list using TkText that holds a list of sales tax rates.  
> I am comparing this list to a list of other rates, which is also implemented  
> via a TkText widget. I was wondering how to highlight the rates (using a  
> different color) in the list that differ from the rates in the other list.

Please use TkTextTag.  
You can find examples using TkTextTag on “/ext/tk/sample/\*”.  
“/ext/tk/sample/tkmulticolumnlist.rb” may be a useful example  
for your purpose.

Or, do you want any other one?
