Get with MULTILINE or HSCROLL

Get with MULTILINE or HSCROLL

Postby reds » Fri Apr 06, 2018 2:02 pm

I want to use HSCROLL or MULTILINE to display a long field on a hand held scanner and then if it needs to be edited call up a dialog box when it has focus.

However it's not working correctly if the HSCROLL or MULTLINE option is used but works OK if they are omitted

TIA
Peter

Code: Select all  Expand view

#include "FWCE.ch"
STATIC oWnd,oGet[3]

***********************
FUNCTION Main()
   local  aData[3]

  aData[1] := "Field One"
  aData[2] := "the quick brown fox jumped over the lazy dog"
  aData[3] := "Field Three"

   DEFINE WINDOW oWnd  
  @ 1,0 GET oGet[1] VAR aData[1]   OF oWnd COLORS CLR_HBLUE,CLR_WHITE  SIZE 90,30
                 
 
   @ 4,0 GET oGet[2] VAR aData[2]   OF oWnd COLORS CLR_HBLUE,CLR_WHITE  SIZE 200,38 ;
                  WHEN EditField(oGet,2)    READONLY  //  HSCROLL  // MULTILINE

  @ 10,0 GET oGet[3] VAR aData[3]    OF oWnd COLORS CLR_HBLUE,CLR_WHITE SIZE 90,30

 
  @ 12, 10   BUTTON  "Exit" ACTION ownd:End()


  ACTIVATE WINDOW oWnd

******************************
FUNCTION EditField(o,n)

        o[n]:bGotFocus  := { ||  EditDialog()}  
return .t.

**************************
FUNCTION EditDialog()

 LOCAL  oDlg,oBtn

 oGet[1]:SetFocus()
  DEFINE DIALOG oDlg  TITLE "edit field" OF oWnd FROM 5, 1 TO 14, 29
 
//  edit details will go here  
 
  @ 3, 5  BUTTON  "END"   SIZE 20, 15  ACTION  {||oDlg:End()}
  ACTIVATE DIALOG oDlg



 
reds
 
Posts: 50
Joined: Tue May 16, 2017 12:19 pm
Location: North London

Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 28 guests