Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ryss Unger
  Where is Ryss Unger?
 Cape Town
 South Africa
 Ryss Unger
 To: peter de groot
  Where is peter de groot?
 Heerhugowaard
 Netherlands
 peter de groot
 Tags
Subject: RE: Grid, memofields .. with Main VFP window suppressed
Thread ID: 610 Message ID: 623 # Views: 3 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Thursday, June 07, 2001 12:40:22 PM         
   


> Hello Ryss,
>
> I solved this way:
>
> For n = 1 to lnFieldcount
>
> If type(field(n)) = "M" && MEMOFIELD..
> lcColumn = ".column"+alltrim(str(n))+".addobject('edt', 'edit')"
> lcCcontrol =".column"+alltrim(str(n))+".currentcontrol = 'edt'"
> llSparse = ".column"+alltrim(str(n))+".sparse = .f."
> lcControlsource = ".column"+alltrim(str(n))+".controlSource; = 'customer_remote_view."+lcFieldName+"'"
> lcHeight = ".rowheight = 20"
> lcVisible = ".column"+alltrim(str(n))+".edt.visible = .t."
> .grdCustomer_remote_view&lcColumn
> .grdCustomer_remote_view&lcCcontrol
> .grdCustomer_remote_view&llSparse
> .grdCustomer_remote_view&lcControlsource
> .grdCustomer_remote_view&lcHeight
> .grdCustomer_remote_view&lcVisible
> .grdCustomer_remote_view&lcColumnWidth
> Endif
> Next
>
>
>
> What do you think of it?
>
> Peter
>
> >
Hi Peter.
Hmmm complicated solution but if it works for you ... use it.

However I appreciated your posting as it reminded me to add this and the impact on Print preview to what we already have in the FAQ on this subject.

My proposal is very simple.
In the main startup program issue the following.

define window editor from 0,01 to 41,80 (or define the color border as preferred.)
set window of memo to editor.

This would open any memo in the editor window as defined above, with the default action such as double clicking a memo field.

And that is it... all done.

You can check to ensure "editor" still exists with:-
IF WEXIST('editor') = .F.
define window editor from 0,01 to 41,80
endif

If you prefer to specify the window to be used you can omit "set window of memo to editor." and when required issue:-

ACTIVATE WINDOW OtherDefinedWindow
modify memo myalias.mymemo in window OtherDefinedWindow
DEACTIVATE WINDOW OtherDefinedWindow

Alternatively you can create an EditBox with control source of vmemo (a variable)
store myalias.mymemo to vmemo .

Show the EditBox by loading the form that contains it or make it visible.
And if required add a button to save vmemo with copy vmemo to myalias.mymemo.
The advantage in doing this is the reduction in corrupt memo fields, as the FPT table is never left in the lurch, so to speak.


Regards
Ryss

ENTIRE THREAD

Grid, memofields Posted by peter de groot @ 6/7/2001 3:00:10 AM
RE: Grid, memofields Posted by Ryss Unger @ 6/7/2001 5:10:11 AM
RE: Grid, memofields Posted by peter de groot @ 6/7/2001 5:37:24 AM
RE: Grid, memofields .. with Main VFP window suppressed Posted by Ryss Unger @ 6/7/2001 12:40:22 PM