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. Image for the cookie policy date
close icon

Best control for formatted message display

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

1 Reply

AD Administrator Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon