View previous topic :: View next topic |
Author |
Message |
JxxDiaz Guest
|
Posted: Tue Mar 28, 2006 5:49 pm Post subject: Formatting text in a cell |
|
|
Is it possible to change the color of certain text in a cell. I am having the user preform a search to populate the Virtual Tree and I would like to change the font color of any occurance of the search phrase in the Virtual Tree.
IE:
Searched for "Neighborhood"...I would like to see the value in the VT displayed as.
Careml Valley Neighborhood 5, Unit Number 4 |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Mar 28, 2006 10:39 pm Post subject: |
|
|
To do this you need to derive a new CellWidget class and override PaintText to draw the text as you want it. The default method is something like:
Code: | protected virtual void PaintText(Graphics graphics, Style style, bool printing)
{
style.DrawString(graphics, Text, GetTextBounds());
}
|
See the section in the online help on using Widgets for more info.
We are looking at the possibility of providing support for displaying rich text in a future version. This would provide alternative mechanism. Have you purchased Virtual Tree? _________________ Infralution Support |
|
Back to top |
|
|
JxxDiaz Guest
|
Posted: Tue Mar 28, 2006 10:49 pm Post subject: |
|
|
Awsome I will try this out. And yes I have purchased Virtual Tree and the Source Code. |
|
Back to top |
|
|
Guest
|
Posted: Tue Mar 28, 2006 11:18 pm Post subject: |
|
|
Infralution wrote: |
See the section in the online help on using Widgets for more info.
|
How do I access this online help? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Mar 28, 2006 11:23 pm Post subject: |
|
|
Its installed when you install Virtual Tree. Simply use the Start->Programs->Infralution->Virtual Tree->Virtual Tree Documentation menu. Or you can access the help from within Visual Studio help by displaying the help contents tab and then the expanding the Virtual Tree section. _________________ Infralution Support |
|
Back to top |
|
|
|