[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: how to add formatted text in a table cell.

Hi

I want to know how to add formatted text in a table cell.
Also, i do not want to apply the same formatting to the entire string in the
cell(as shown below)

I am using a table viewer to display search results for a search string
entered by the user. In one column of the table i am dispalying the sentence
in which the string occurred.Now i want the search string to be highlighted
in the sentence being shown in the table viewer.

For eg:
If the search string is 'CPU'

Event ID        Matching String
1                      CPU Utilization low
23                    low CPU memory
45                    low CPU utilization
"Deepti" <deeptisuri124@xxxxxxxxx> wrote in message news:frnta3$us1$1@xxxxxxxxxxxxxxxxx...
> Hi
>
> I want to know how to add formatted text in a table cell.
> Also, i do not want to apply the same formatting to the entire string in the
> cell(as shown below)
>
> I am using a table viewer to display search results for a search string
> entered by the user. In one column of the table i am dispalying the sentence
> in which the string occurred.Now i want the search string to be highlighted
> in the sentence being shown in the table viewer.
>
> For eg:
> If the search string is 'CPU'
>
> Event ID        Matching String
> 1                      CPU Utilization low
> 23                    low CPU memory
> 45                    low CPU utilization
>
>
>
> I am trying to do this by using a TableEditor with a styled text widget.
> But the problem with this is , the editors do not get disposed each time
> search is pressed.
>
> Is there any other way to do this?
>
>