Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible to display text without word wrap?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00151158
Message ID:
00155599
Vues:
22
>George,
>
>if fpw 2.6 I use
>
>MODIFY FILE myreport NOEDIT
>
>to display my text-based reports. They must be shown without
>word wrap since lines are long. In modal environment, this works OK.
>
>I want the same thing to be done in modeless forms in vfp without
>using activex.
>
>Editbox wraps text, putting modi file inside form is difficult,
>emulating modi file with grid doesn't allow to select multiple
>partial lines.
>
>George, is there an easy way to do it?

Hi Andrus,

I'd use something like the following (and, yes, it'll work in 2.6).
* m.file is the name of the text file being displayed.
DIMENSION a_settings(25)
MODFILE FILE (m.file) NOEDIT NOWAIT
m.whandle = _Wontop()
* Get the editor settings
= _EdGetEnv(m.whandle, @a_settings)
* Turn off word wrap
a_settings(16) = -1
* Set word wrap off
= _EdSetEnv(m.whandle, @a_settings)
* Maximize the window so that the new
* setting take effect.
= _WZoon(m.whandle, 2)
The above should do the trick. Be sure, however, that foxtools is loaded.

hth,
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform