Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sluggish response in form with RTF controls and timer
Message
De
05/06/2006 07:12:52
John Faithfull
Hunterian Museum, University of Glasgow,
Glasgow, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Sluggish response in form with RTF controls and timer
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01127055
Message ID:
01127055
Vues:
84
Hi folks,

I have a form which includes a grid, two RTF text controls, and a timer to force refresh of a "characters left" counter as the user edits data.

Originally the form had two text boxes, rather than RTF edit controls. With simple text boxes, the form was perfectly responsive and fast. However, I need the RTF functionality to support italicization of portions of text where it includes biological genus/species names.

With the RTF boxes, the form is pretty sluggish. Even bolding/unbolding of selected text in the boxes can be quite slow, and the grid (which includes a rtfobject.text column), is also very sluggish in responding.

The rtf object is instantiated once, in the main program of the project before the form is instantiated.

I use the timer to force refresh of a counter on the form to display the number of characters left before a maximum user input limit is reached. It doesn't try to refresh everything on the form, but does need to calculate the length of the "text only" from the RTF controls on each 200 millisecond interval. This seems to me probably inefficient, but other approaches I tried (eg on the interactive change method of a text box) seemed even worse.

Where is the problem likely to lie eg ?

(1) Having two RTF edit controls on the form?
(2) Having a timer which refers to the RTF object too often?
(3) Having a grid which refers to the text version of an RTF object?
(4) All of the above
(5) Somewhere else entirely..

Any help /advice / suggestions gratefully received...

Cheers

John
Dr. JW Faithfull
Curator in Geology
Hunterian Museum
University of Glasgow
Glasgow G12 8QQ
Scotland
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform