Hi,
I have a grid with memo fields, the latter currently can be opened with command buttons (1 per memofield): These open predefined windows (so they can be arranged e.g. on various monitors). I then have a routine for optional saving and restoring all onscreen forms, which works fine for "normal" forms with their editing grids etc on . In order to obtain or set the memo window positions programmatically, it seems I need to give the defined windows (used in the MODI MEMO CLAUSE) an Object name. e.g. MEMOWINDOW1. I assumed when the memo windows are moved, the top, left, Height, Width properties would be obtainable from the object via this namee.g s MEMOWINDOW1.TOP. But, strangely, although I can restore their positions by writing to these object properties (having just defined the windows if necessary), when I try to read them for saving, MEMOWINDOW1.TOP is not recognised ("alias MEMOWINDOW1 not found").
e,g,in CMDEDitMemo.button.Click
SELECT (aliasname)
mymemfield=this.tooltiptext && memo field name stored in tooltip text
IF TYPE(mymemfield)="M"
IF !WEXIST("MEMOWIN1") &&f rst creation of window for meo field
DEFINE WINDOW MEMOWIN1 AT 20,20 SIZE 30,30 NAME MEMOWINDOW1 IN screen TITLE mymemfield FONT 'Arial',7 CLOSE FLOAT GROW
MEMOWINDOW1.LEFT=THIS.LEFT &&position starting at command button
MEMOWINDOW1.TOP=THIS.TOP
MEMOWINDOW1.movable=.t.
Endif
MODIFY MEMO (mymemfield) NOWAIT WINDOW MEMOWIN1
ENDIF
then,in other parts of the app, memowindow1.left is not findable.
I realise DEFINE window is a bit old school, but find this MODI MEMO method convenient for setting up memo edits . The relation between the supposed object name, the "windoe name" etc is tricky. BASIC question- whats best way to save and restore the position of such windows. Or, Is the best option to create memo edit forms with just an edit box independent of the form with the mother grid on? (I prefer the ability to have memo windows to be outside the window which holds the rest of the grid and a load of other controls)
Thanks
I have a grid with memo fields, the latter currently can be opened with command buttons (1 per memofield): These open predefined windows (so they can be arranged e.g. on various monitors). I then have a routine for optional saving and restoring all onscreen forms, which works fine for "normal" forms with their editing grids etc on . In order to obtain or set the memo window positions programmatically, it seems I need to give the defined windows (used in the MODI MEMO CLAUSE) an Object name. e.g. MEMOWINDOW1. I assumed when the memo windows are moved, the top, left, Height, Width properties would be obtainable from the object via this namee.g s MEMOWINDOW1.TOP. But, strangely, although I can restore their positions by writing to these object properties (having just defined the windows if necessary), when I try to read them for saving, MEMOWINDOW1.TOP is not recognised ("alias MEMOWINDOW1 not found").
e,g,in CMDEDitMemo.button.Click
SELECT (aliasname)
mymemfield=this.tooltiptext && memo field name stored in tooltip text
IF TYPE(mymemfield)="M"
IF !WEXIST("MEMOWIN1") &&f rst creation of window for meo field
DEFINE WINDOW MEMOWIN1 AT 20,20 SIZE 30,30 NAME MEMOWINDOW1 IN screen TITLE mymemfield FONT 'Arial',7 CLOSE FLOAT GROW
MEMOWINDOW1.LEFT=THIS.LEFT &&position starting at command button
MEMOWINDOW1.TOP=THIS.TOP
MEMOWINDOW1.movable=.t.
Endif
MODIFY MEMO (mymemfield) NOWAIT WINDOW MEMOWIN1
ENDIF
then,in other parts of the app, memowindow1.left is not findable.
I realise DEFINE window is a bit old school, but find this MODI MEMO method convenient for setting up memo edits . The relation between the supposed object name, the "windoe name" etc is tricky. BASIC question- whats best way to save and restore the position of such windows. Or, Is the best option to create memo edit forms with just an edit box independent of the form with the mother grid on? (I prefer the ability to have memo windows to be outside the window which holds the rest of the grid and a load of other controls)
Thanks