Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MEMO DOES NOT OPEN

Status
Not open for further replies.

andy0923

Programmer
Jul 26, 2002
65
US
Given the following:
(1) a prg containing screen=off which calls
(2) a form which has showwindow as top level
(3) both of which are compiled into an exe

double clicking on a memo field does not open the memo field.

Has anyone noticed that problem? I'd like to know the rationale and any solution.

Altering any of the three returns the normal behavior.

The screen=off seems to be the simplest and most intuitive way of hiding the main window and I'd like to keep it but I cant understand if its my coding, a bug or the behavior is correct - but it is annoying.

Thanks all for any help.
 
I suppose it's because Fox tries to open a plain vanilla window when you double-click on the Memo and it doesn't know where to put that window.

Could you write a simple form to display the Memo in an editbox; declare that form as "In Top-Level Form"; and open the form on the double-click?

Geoff Franklin
 
It's similar to the print preview window (pre-VFP9 anyways). The memo window is being opened, except you can't see it, because it is opening in the _screen. I haven't tried it, but I believe if you issue a _screen.visible that you'll see the memo edit window (you'd have to either make it visible before the browse command or issue your browse with nowait in order to do it).

As alvechurchdata has already suggested, it is a fairly simple task to create a form with an editbox on it for editing memo fields... that is probably your best bet.

boyd.gif

SweetPotato Software Website
My Blog
 
I know the memo editing window will not pop up from any modal form. So maybe your tpo level form is modal and thereby prevents the memo edit window. Using an editbox may be the best solution anyway, as the caption of a memo editing window is table.field and normally that is quite technical.

Bye, Olaf.
 
Thanks all.

Setting _screen.visible to .t. defeats the purpose of hiding the window.

However, I finally got a form to open (after learning how to read) to display the memofield - in top level was the key.

Now, I just have to figure out out to assign the value of the edit box back to the memo field.

This is such a great site thanks to the programmers who never fail to answer a question.
 
andy0923 said:
Now, I just have to figure out out to assign the value of the edit box back to the memo field.

There are a couple ways to do this. Simplest would be in the form's unload event to do something like this...

Code:
Replace MyTable.MyMemo with This.Edit1.Value in "MyTable"

...or you could set it up so that MyTable is buffered and then you could provide the user with Save and Cancel buttons (or OK, Apply, and Cancel). In the Save button you would do a TableUpdate() and then release the form. In the Cancel button you would do a TableRevert() and then release the form. OK, Apply, and Cancel would work in a similar fashion, though you wouldn't release the form when the user clicked Apply.

boyd.gif

SweetPotato Software Website
My Blog
 
u guys are great!

Before reading your last two posts I found the following to work:

init of the called form -
LPARAMETERS FLDNAME
THIS.FLDNAME=FLDNAME
THIS.Caption=FLDNAME

Activate in the called form:
THIS.VISIBLE=.F.
FLDNAME=THIS.FLDNAME
MODIFY MEMO &FLDNAME IN WINDOW (THIS.NAME)

THIS.RELEASE

But I am eager to try Craig's alternatives.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top