473,406 Members | 2,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

RichTextBox flickers when using HideSelection property

Hi All,

When I runs following code RichTextBox control on form flickers.
I don't know why it's so?
Is any idea to avoid flickering?

private void cmdBold_Click(object sender, System.EventArgs e)

{
RtbData.HideSelection =true;
int intCounter;
int intEnd=RtbData.SelectionStart + RtbData.SelectionLength;
for (intCounter=RtbData.SelectionStart ;intCounter<intEnd
;intCounter++ )
{
RtbData.Select (intCounter,1);
System.Drawing.Font fOld;
fOld= RtbData.SelectionFont;
FontStyle fStyle;
fStyle= fOld.Style ^ FontStyle.Bold;
RtbData.SelectionFont = new System.Drawing.Font (
fOld.FontFamily, fOld.Size, fStyle);
}
RtbData.HideSelection =false;
}

Thanks and Regards,
Sakharam Phapale
Nov 16 '05 #1
0 1317

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: user | last post by:
Hello Is there any proprety/method to set that i always see new text (vertical scrollbar always on bottom) ? Thanx Michal
2
by: JRB | last post by:
I have a thread adding lines of text to a richtextbox on my windows form about every 1 second. I want the last line of text to always be visible, which it is until the box gets filled up. The last...
1
by: Jesper | last post by:
Hi, Is it possible to scroll a RichTextBox programmatically to a given text selection in it, such that the selected text becomes viewable. regards. Jesper.
1
by: Goran Djuranovic | last post by:
Hi all, I would really appreciate if someone cound point me to the right direction, regarding the issue I have. Or suggest another solution. I have a VB.NET windows service that is processing...
6
by: andreas | last post by:
A selected text has fontstyles like bold and italic and underscore I want to remove one of them without changing the other fontstyles. How to do that? Thanks for any response
4
by: tsahiasher | last post by:
hi, i'm trying to use the RichTextBoxSelectionColor property, but in any combination of command order i try, the text color is not changed. the only time it worked was when i set SelectionStart =...
9
by: James Wong | last post by:
Hi, I use the RichTextBox in my program. It will use different language in this RichTextBox (chinese and english characters), and it set the "DualFont" and use different fonts. By the way, how...
8
by: nirdeshonline | last post by:
Hi, I have added a simple listbox in windows form under c# 2.0. It contains a collection of approx 10 strings as list items. Now when i resize the form whole listbox flickers. Please tell me...
3
by: michael sorens | last post by:
The documentation for the RichTextBox is sketchy at best. I want to do a very simple task but I cannot find information on this. I am using a RichTextBox as an output window. Some text I want to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.