Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 855589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:05:59+00:00 2026-05-15T08:05:59+00:00

I have a strange issue that I’m not too sure on how to fix

  • 0

I have a strange issue that I’m not too sure on how to fix or address. I’m writing a mini text editor style application – RichTextBox editor.

I need to do some complex parsing after the selection changes – updating position, selection text and various other bits about the context of the text around the area.

As it takes a bit of processing I don’t want it to fire each time the selection changes if the user is scrolling with their arrow keys. I thought of using the Application.Idle, but it fires too regularly. I tried a timer, but it may fire while the selection arrows are still moving.

What I was thinking of was a countdown timer sort of utility that will reset the timer each time the RichTextBox SelectionChanged event fires, then when the timer hits 500 ms or 1000 ms it will execute the complex processing runs.

Does this sound like a good idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:06:00+00:00Added an answer on May 15, 2026 at 8:06 am

    You should probably start your processing in its own thread when it takes too long. As soon as you get new inputs you can stop the previous calculation and start with the new information again (so consider a cancel mechanism for your thread).

    When your thread is done you have to check if its results are valid (the selecion did not change in the meantime). Finally, you can “synchronize” the results of the calculation to the GUI, which is hopefully quick enough 🙂

    This does only work, when there is a certain amount of calculation that can be done without writing to the GUI … I am not sure if you can implement it this way. It depends on the type of your calculations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange issue that has arisen recently: Whenever I enter text, even
Strange issue that I'm not exactly sure about...also, please feel free to correct me
I have a strange issue that I'm baffled with but I'm sure someone in
I have the strange issue that certain images from my webapp are not updated
I have a quite strange issue. Please, look at these screenshots: Code of that
Strange issue. I have SQL Server running on an EC2 box that I can
I am facing a very strange issue. I have a SharePoint webpart that displays
I have a very strange issue that I'm hoping someone can help me with.
I have a strange issue from a client in that our code, which they
I have a strange issue with JUnit 4 tests in Eclipse 3.5 that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.