xBrowse - Control Character

xBrowse - Control Character

Postby Colin Haig » Wed Aug 08, 2012 6:06 am

Hi All

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




 
Colin Haig
 
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Re: xBrowse - Control Character

Postby Rick Lipkin » Wed Aug 08, 2012 2:39 pm

Colin

Looking at the Get in FiveWin.ch it shows both TEXT, MEMO and MULTILINE .. however MEMO seems to be associated with Multiline ???.

Code: Select all  Expand view

#command @ <nRow>, <nCol> GET [ <oGet> VAR ] <uVar> ;
            [ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
            [ <memo: MULTILINE, MEMO, TEXT> ] ;
            [ <color:COLOR,COLORS> <nClrFore> [,<nClrBack>] ] ;
            [ SIZE <nWidth>, <nHeight> ] ;
            [ FONT <oFont> ] ;
            [ <hscroll: HSCROLL> ] ;
            [ CURSOR <oCursor> ] ;
            [ <pixel: PIXEL> ] ;
            [ MESSAGE <cMsg> ] ;
            [ <update: UPDATE> ] ;
            [ WHEN <uWhen> ] ;
            [ <lCenter: CENTER, CENTERED> ] ;
            [ <lRight: RIGHT> ] ;
            [ <readonly: READONLY, NO MODIFY> ] ;
            [ VALID <uValid> ] ;
            [ ON CHANGE <uChange> ] ;
            [ <lDesign: DESIGN> ] ;
            [ <lNoBorder: NO BORDER, NOBORDER> ] ;
            [ <lNoVScroll: NO VSCROLL> ] ;
       => ;
          [ <oGet> := ] TMultiGet():New( <nRow>, <nCol>, bSETGET(<uVar>),;
             [<oWnd>], <nWidth>, <nHeight>, <oFont>, <.hscroll.>,;
             <nClrFore>, <nClrBack>, <oCursor>, <.pixel.>,;
             <cMsg>, <.update.>, <{uWhen}>, <.lCenter.>,;
             <.lRight.>, <.readonly.>, <{uValid}>,;
             [\{|nKey, nFlags, Self| <uChange>\}], <.lDesign.>,;
             [<.lNoBorder.>], [<.lNoVScroll.>] )

 


Try changing TEXT to MEMO or TEXT to MULTILINE in your get and see if that gives you the desired behavior.

Rick
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: xBrowse - Control Character

Postby Enrico Maria Giordano » Wed Aug 08, 2012 3:29 pm

TEXT, MEMO and MULTILINE clauses are synonyms.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 83 guests