I use a field in my browse that pops up a dialog for entering notes ( the dialog is not from a resource file ) - this
works fine with Windows 7 but on Windows XP the enter key is saved as a character in the field. ( hope that makes sense).
When using a resource we select multi line and want return - how do you select this when not using a resource.
- Code: Select all Expand view
function sfNotes(nRow,nCol,oCol,aData,nBottom,nRight,nText1,nText2,nBtnRow,nBtnOk,nBtnCancel)
local oDlg, oGet,aPoint,cOldNotes := '',cNotes := ''
aPoint := ClientToScreen( oCol:oBrw:hWnd, { nRow, nCol } )
nRow := aPoint[ 1 ]
nCol := aPoint[ 2 ]
cOldNotes := aData[1]
cNotes := aData[1]
DEFINE DIALOG oDlg FROM nRow, nCol TO nRow + nBottom, nCol + nRight PIXEL STYLE WS_POPUP
@ 02,02 GET oGet VAR cNotes TEXT SIZE nText1,nText2 PIXEL OF oDlg UPDATE COLOR GETCOLOR
@ nBtnRow,nBtnOk BUTTON "Ok" SIZE 47,10 PIXEL OF oDlg ;
ACTION (oGet:Refresh(), oDlg:End() )
@ nBtnRow,nBtnCancel BUTTON "Cancel" SIZE 47,10 PIXEL OF oDlg ;
ACTION (cNotes := cOldNotes,oGet:Refresh(),oDlg:End() )
ACTIVATE DIALOG oDlg ;
ON PAINT(oGet:Refresh(),oGet:SetPos(0),oDlg:Update())
return(cNotes)
//--------------------------------------------------------------------------------------------
Regards
Colin