当前位置:网站首页>C RichTextBox controls the maximum number of rows
C RichTextBox controls the maximum number of rows
2022-06-23 07:58:00 【pcjiushizhu】
private void m_txtComment_TextChanged(object sender, EventArgs e)
{
int lines = m_txtComment.GetLineFromCharIndex(m_txtComment.Text.Length - 1); //m_txtComment.Lines.Length; // Row number
if(lines > maxLine - 1)
{
// The first 6 Position of the first word of the line
int my_index = m_txtComment.GetFirstCharIndexFromLine(maxLine);
// Keep only the first five lines
m_txtComment.Text = m_txtComment.Text.Substring(0, my_index - 1);
}
m_ri.CommentContent.Content = m_txtComment.Text;
m_txtComment.Select(m_txtComment.Text.Length, 0);
}
边栏推荐
- Gif verification code analysis
- Imperva- method of finding regular match timeout
- HCIP之路
- Rotary table visual screening machine and its image recognition system
- QT irregular shape antialiasing
- Location of firewalld configuration file
- openni. utils. OpenNIError: (OniStatus.ONI_STATUS_ERROR, b‘DeviceOpen using default: no devices found‘
- Deploy kubersphere in kubernetes
- 《一周的朋友》
- Matlab随机波动率SV、GARCH用MCMC马尔可夫链蒙特卡罗方法分析汇率时间序列
猜你喜欢

测试apk-异常管控NetTraffic攻击者开发

Matlab random volatility SV, GARCH using MCMC Markov chain Monte Carlo method to analyze exchange rate time series

如何在conda虚拟环境开启jupyter-notebook

Playwirght深度入门

Vs problems when connecting to SQL myconn OPen(); cannot execute

《一周的朋友》

Interview questions of a company in a certain month of a certain year (1)

QT project error: -1: error: cannot run compiler 'clang++' Output:mingw32-make. exe

vtk.js鼠标左键滑动改变窗位和窗宽

Apache Solr 任意文件读取复现
随机推荐
Acwing第 56 場周賽【完結】
socket编程——select模型
Mathematical knowledge: Euler function - Euler function
Match 56 de la semaine d'acwing [terminé]
某年某月某公司的面试题(1)
快速排序 + 冒泡排序 + 插入排序 + 选择排序
Capturing packets to find repeated acks and a large number of TCP retransmissions in TCP sessions -- sack (selective acknowledgement) technology
Playwirght深度入门
Tensorboard的使用
YGG 西班牙 subDAO——Ola GG 正式成立
mysql中多表视图性能疑惑
imperva-查找正则匹配超时的方法
深度学习------不同方法实现vgg16
PHP file contains -ctf
three. Solution to stripe shadow and grid shadow in JS
Introduction to MySQL system tables
C#重启应用程序
Eureka service registration and discovery
《一周的朋友》
The sandbox has reached a cooperation with football player to bring popular football cartoons and animation into the metauniverse