Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying text from an output window?
Message
De
01/02/2006 01:10:40
 
 
À
01/02/2006 00:15:00
Dale Strickler
Independent Contractor
Afton, Virginie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Divers
Thread ID:
01092201
Message ID:
01092210
Vues:
23
>Hi all,
>
>I am new and this is my first post. I have not explored much so this is all default formating and signature ... for now.
>
>I tried searching for a way to further improve my output window and found nothing.
>
>I use a OutWin.prg to generate an alternative output window so that I can Ctrl-Tab between edit/browser windows and the output window. This is the code:
>
> define window output from 0,0 to 10,10 title 'Output' system noclose float grow ZOOM
> activate window output
> ZOOM WINDOW output MAX
>
>I would love to be able to select and copy text from the output window! I can't seem to find any attribute of the window that will allow that. Any ideas?
>
>Thanks!
Hi Dale,
The problem is is that the window you are defining doesn't "hold" anything... it is just outputting text to the screen (albeit in a window) as if using ? command.

You need to create a text file or a table field like a memo field to contain the output. Then you can select it and copy, paste, etc. It would be much easier to create this in a form but in the spirit of your code I tried this and it worked:
CREATE CURSOR test (txt M)
APPEND BLANK
define window output from 0,0 to 10,10 title 'Output' system noclose float grow ZOOM 
*!*	activate window output
ZOOM WINDOW output MAX
MODIFY MEMO txt WINDOW output
All I am doing is creating a temporary cursor, adding a blank record, you can add text to the field, cut, copy, paste, etc.

However, if I understand what you are doing, this may suit you a little better:
SET PRINTER TO test.txt additive
SET PRINTER on
?"test"
?"test2"
SET PRINTER off
SET PRINTER to
when you want to look and manipulate the output do the following:
define window output from 0,0 to 10,10 title 'Output' system noclose float grow ZOOM 
MODIFY FILE test.txt WINDOW output
Hope this helps,
Ed
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform