We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Best control for formatted message display

Thread ID:





37519 Nov 23,2005 05:42 PM UTC Nov 25,2005 10:25 PM UTC WinForms 1
Tags: FAQ
Badri Rajani Kanth
Asked On November 23, 2005 05:42 PM UTC

HI, I have to display some dynamic message like "user ABC requested DELETE on contacts". This is a simple but formatted message. I have to display "ABC" and "DELETE" in different colors and formats. Do i have any single control to format text at different positions? Simple label does not work. I dont want html cotrols cause of non-windows look. Rgds Rajani Kanth

Administrator [Syncfusion]
Replied On November 25, 2005 10:25 PM UTC

I am not really surewhat you are trying to do but try this: Put a richtextbox named richtextbox1 on your windows form then place the following code in the forms load event. Dim str As String str = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fcharset0 Times New Roman;}{\f1\fswiss\fprq2\fcharset0 Tahoma;}{\f2\fswiss\fprq2\fcharset0 Arial Narrow;}{\f3\fswiss\fcharset0 Arial;}}" str += "{\colortbl ;\red128\green0\blue0;\red0\green128\blue0;}" str += "\viewkind4\uc1\pard\sb100\sa100\f0\fs24 user \cf1\f1\fs32 ABC\cf0\f0\fs24 requested \cf2\f2 DELETE\cf0\f0 on contacts\par" str += "\pard\f3\fs20\par}" RichTextBox1.Rtf = str


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon