Webb12 okt. 2024 · richTextBox滚动到最后一行 //Way1 string str = DateTime.Now.ToString(); //让文本框获取焦点 richTextBox1.Focus(); //设置光标的位置到文本尾 richTextBox1.Select(richTextBox1.TextLength, 0); //滚动条滚动到控件光标处 richTextBox1.ScrollToCaret(); richTextBox1.AppendText(str_); 1 2 3 4 5 6 7 8 9 10 11 12 … Webb8 mars 2024 · RichTextBox1.Select (RichTextBox1.Text.Length - 1, 0); Edit: If you have a lot of text in the textbox and which it to scroll the caret into view too, add this line: RichTextBox1.ScrollToCaret (); See msdn for more. Share Improve this answer Follow edited Mar 15, 2024 at 9:32 answered Aug 27, 2010 at 10:39 Pondidum 11.4k 8 49 69 1
RichTextBox.Selection Property (System.Windows.Controls)
WebbУ меня есть RichTextBox и кнопка. Я хочу получить один char из самого RichTextBox и менять цвет его каждый раз когда юзер кликает кнопку. Я много читал про TextRange но у меня не получается это сделать нужным образом. Webbinternal static void Update (RichTextBox box) { if (appendQueue.IsEmpty) return; var start = box.SelectionStart; var len = box.SelectionLength; var scroll = box.TextLength == start; LogLine result; box.Select (box.TextLength, 0); while (appendQueue.TryDequeue (out result)) { box.SelectionColor = result.color; box.AppendText (result.line+"\r\n"); … horse van hire northern ireland
编写此控件的最佳方法是什么? - 问答 - 腾讯云开发者社区-腾讯云
Webb17 juli 2024 · rtxt.Text = "SELECT Title, Rating, CategoryCode, Description FROM tblMovieTitles WHERE (Rating= '" + this .chklCode.Text + "' ) AND (CategoryCode ="; //添加值//在所有选定的项目上循环// AND/OR (CategoryCode = lstCategorie [x].value ; rtxt.Text += ")" ;scmd = new SqlCommand (rtxt.Text, conn); 我是否错过了上面的内容. http://www.uwenku.com/question/p-djhugtju-hx.html Webb5 maj 2013 · TabPage activePage = tabs.SelectedTab; RichTextBox xmlBox = activePage.Controls.Find ("xmlBox", true).Single () as RichTextBox; xmlBox.DeselectAll … horse vaulting facility in oregon