473,405 Members | 2,279 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,405 software developers and data experts.

RichTextBox lockup

I have a RichTextBox that:
- 1st would intermittently show the scroll bars but they wouldn't work
- 2nd now doesn't allow any interaction even though it looks normal

The application processes pure text files up to 20 MB. The data is
processed and summed into StringBuilder and then placed into the RichTextBox
using:
-- rtxt1.Text = strBuilder.ToString()

The RichTextBox is initially set up on the form as:
-- DetectUrls = False
-- Enabled = False
-- ReadOnly = True
-- ScrollBars = Both
-- WordWrap = False

The only values that needed to be changed (I thought) were Enabled and
ReadOnly, which were to be toggled between True and False.

During processing, the RichText Box is disabled:
-- rtxt1.Enabled = False
-- rtxt1.ReadOnly = True

After processing, the RichText box is re-enabled to allow for manual
tweaking of the data.
-- rtxt1.Enabled = True
-- rtxt1.ReadOnly = False

That seemed to work for small files, but the problem of the non-functioning
scroll bars appeared when a mix of small and large files were processed -- it
seemed to get "confused".

.... this is what finally worked to make the RichText box to work reliably:
-- rtxt1.Enabled = True
-- rtxt1.ReadOnly = False
-- rtxt1.Visible = True
-- rtxt1.ScrollBars = RichTextBoxScrollBars.Both

That works okay, but I'd like to lose the RichTextBoxScrollBars.Both
statement because it exactly doubles my processing time -- 12 seconds for
that statement alone on 20 MB data in the RichTextBox.

However, removing the ScrollBars statement now causes a text box that looks
normal but doesn't allow any interaction with it.

Any help appreciated for whatever it is I'm overlooking.
Nov 21 '05 #1
0 1060

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

Similar topics

1
by: Lucas | last post by:
I have written a COM dll using vc++ and ATL. I am using this dll from an application written in VB. When the VB application finishes with the object it sets the object = nothing. Somewhere...
3
by: Tony Epton | last post by:
Got a site where we are still running the front end and back end on an older machine under access 97 plus a new machine using XP as the front end. Only installed the XP version yesterday. ...
0
by: nouno | last post by:
I am trying to spell check a richtextbox. Through code (shown below) I save the contents of the richtextbox to a rtf file, open the rtf file in Word, spell check it, save it, and then load the ftf...
2
by: JonnyT | last post by:
I searched high and low for an answer on how to auto scroll a richtextbox and now I finally have it. Since it took me a while to get a good efficient way of doing it that didn't require focus to...
17
by: OlafMeding | last post by:
Below are 2 files that isolate the problem. Note, both programs hang (stop responding) with hyper-threading turned on (a BIOS setting), but work as expected with hyper-threading turned off. ...
0
by: Vincent | last post by:
Dear all, I have implemented a class to export the content of RichTextBox to image in WYSISYG mode so that line breaks on the screen are the same as exported. C# Code: public struct...
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...
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: Vimalathithan | last post by:
I just developing a editor. I have provide the options like Bold, Italic, underlin, font change, font size change. These font options are keep in with one toolstripbutton. the toolstripbar keep...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.