Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Putting the cursor at the end of a textbox
Message
De
04/01/2005 17:46:51
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Putting the cursor at the end of a textbox
Divers
Thread ID:
00974216
Message ID:
00974216
Vues:
50
I have a textbox defined with multiline. It is used for showing the log of a process. As it becomes long, the scrollbar will appear. If I only append text to the control, the cursor will remain at the top so I will not see the actual log process of the last lines being added. So, I did this when I add some text:
        LogWebServer.SelectionStart = LogWebServer.Text.Length
        LogWebServer.ScrollToCaret()
This put the cursor at the end of the textbox. It then scroll the content at the bottom. I can then see the recent text being added.

However, this is causing a bug which freezes the application from time to time. It is easily reproducable when I don't comment those lines. Is there a better way to put the visual content at the bottom to be visual which might not cause the freeze bug to happen?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Répondre
Fil
Voir

Click here to load this message in the networking platform