AppendTextAsRtf() публичный Метод

Appends the text using the current font, text, and highlight colors.
public AppendTextAsRtf ( string _text ) : void
_text string
Результат void
Пример #1
0
		private void ics_ConferenceMessageReceived(object sender, string messageReceived, string fromUser)
		{
			Invoke(new MethodInvoker(delegate
			{
				var _rtBox = new ExRichTextBox();
				int _index;


				_rtBox.AppendTextAsRtf(fromUser + " Says\n",
									   new Font(this.Font, FontStyle.Bold), RtfColor.Blue);
				_rtBox.AppendTextAsRtf(messageReceived, new Font(this.Font, FontStyle.Bold), RtfColor.Gray);
				if ((_index = _rtBox.Find(":)")) > -1)
				{
					_rtBox.Select(_index, ":)".Length);
					_rtBox.InsertImage(pbSmile.Image);
				}
				chatForm.rtBox.AppendRtf(_rtBox.Rtf);
				// Scroll to bottom so newly added text is seen.
				chatForm.rtBox.Select(chatForm.rtBox.TextLength, 0);
				chatForm.rtBox.ScrollToCaret();

				// Return focus to message text box
				chatForm.txtSendMessage.Focus();
			}
			));
			
		}