groupjahad
سه شنبه 29 مرداد 1387, 18:42 عصر
سلام
من می خوام یه سرچ روی richtextbox داشته باشم و کدی که زدم اینه
if (txtmessage.Text != "")
{
MessageBox.Show("Search Start");
for (; position_find != -1 && pos <= Lenght_Text ; )
{
position_find = richTextBox1.Find(txtmessage.Text, pos, Lenght_Text, System.Windows.Forms.RichTextBoxFinds.MatchCase );
txtfindresult.Text = position_find.ToString();
temp = position_find;
pos += temp;
MessageBox.Show(temp.ToString());
}
}
فقط یه مشکل دارم و اونم اینه که سرچ روی تمام عبارات انجام نمی شه یعنی اگر الف سرچ بشه باید 100 مورد نشون بده که فقط 10 مورد نشون میده
لطفاً کمک کنید
من می خوام یه سرچ روی richtextbox داشته باشم و کدی که زدم اینه
if (txtmessage.Text != "")
{
MessageBox.Show("Search Start");
for (; position_find != -1 && pos <= Lenght_Text ; )
{
position_find = richTextBox1.Find(txtmessage.Text, pos, Lenght_Text, System.Windows.Forms.RichTextBoxFinds.MatchCase );
txtfindresult.Text = position_find.ToString();
temp = position_find;
pos += temp;
MessageBox.Show(temp.ToString());
}
}
فقط یه مشکل دارم و اونم اینه که سرچ روی تمام عبارات انجام نمی شه یعنی اگر الف سرچ بشه باید 100 مورد نشون بده که فقط 10 مورد نشون میده
لطفاً کمک کنید