Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Underline/bold partial text on a text/edit/label box
Message
De
30/06/1998 11:10:13
 
 
À
30/06/1998 10:00:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00112686
Message ID:
00112934
Vues:
52
Mr. Chu:

Would you please let me know what RTF control is?

The RTF control is an activeX control which was provided by M$ with VFP50. Its file name is richtx32.ocx. It provides a means of formatting text with italics, underlines, etc. It could be the answer to your problem. There is considerable information in the UT forum about this control -- do a search on "RTF" and one on "Rich Text" which should pull out most of the discussion.

Besides, let me explain the situation I am facing. There are a series of statements stored in a table. The user wants to display those statements one at a time on a form. He also want to highlight particular words when the statements display. My thought is to show the statements in textbox or editbox. Will RTF control help?

I deal with this situation by using a textbox to display the statements and selectively highlighting the particular words using the .selstart and .sellength properties of the text control. You will probably have to manipulate the .selectedforecolor and .selectedbackcolor properties to get the appearance you want. For example if your text is displayed in the standard black text on a white background, you could set your .selectedforecolor to red so that the highlighted word is red on a white background. In the phrase:
                    Please select ONE of the following:
.selstart would be set to 15 so that the highlighted section would begin with the "O" in ONE (the 15th character of the string), and .sellength would be 3.

You would also have to disable the control in some fashion, however, so that the user could not actually edit it -- setting .readonly to .T., for example.

However, you could still use my first suggestion, two labels. Even though the source of the label .caption text is a table, the labels could easily be refreshed from a table. For example, label1 = "Please select ONE of the following" and label2 = SUBS(label1,15,3) (= "ONE"). Set .fontunderline of labe2 to .T. and display label2 on top on the ONE in label1. It would take some coding, but it is feasible.

regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform