Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / June 2007

Tip: Looking for answers? Try searching our database.

help on richtextbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AVL - 20 Jun 2007 08:14 GMT
hi,
i'm new to winforms.....

i need to display certain data on form in  a texbox..
but few words in the data need to appear as colored text....

i've tried with textbox and rixhtextbox..but no luck...can anyone help me out
Marius Horak - 20 Jun 2007 08:25 GMT
More or less like this:

rtx.Clear();
rtx.Text = "There is life on Mars";
rtx.Select(9,4);
rtx.SelectionColor = Color.Red;
rtx.SelectionFont = new Font(rtx.SelectionFont, FontStyle.Bold);

MH
AVL - 20 Jun 2007 13:19 GMT
thanks marius

but the problem is the selection works only once...
i've a big paragraph in which several words have to be in different colors..
how do i accomplish this?

> More or less like this:
>
[quoted text clipped - 5 lines]
>
> MH
Marius Horak - 20 Jun 2007 13:33 GMT
> thanks marius
>
> but the problem is the selection works only once...
> i've a big paragraph in which several words have to be in different
> colors..  how do i accomplish this?

rtx.Clear();
rtx.Text = "There is life on Mars";
rtx.Select(9,4);
rtx.SelectionColor = Color.Red;
rtx.SelectionFont = new Font(rtx.SelectionFont, FontStyle.Bold);

rtx.Select(17,4);
rtx.SelectionColor = Color.Blue;
rtx.SelectionFont = new Font(rtx.SelectionFont, FontStyle.Bold);

MH

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.