FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Xbrowse and Touchscreen best use
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM

Xbrowse and Touchscreen best use

Posted: Fri Feb 17, 2023 10:20 AM

i'm going to make a small program based on a xbrowse dialog for changing data, but with the use of a touchscreen. (Kind of invoice looking browse)

The quantities need to be updated, and this can be a any digit from 1 until xxx.

What are you using ?

  • Having a slider (don't now how you call it) insite each cell with a up/down arrow

  • Just select the cell and have a digital keyboard visual on the screen and use that to change data ?

  • or something else ?

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 1799
Joined: Thu Sep 05, 2019 05:32 AM

Re: Xbrowse and Touchscreen best use

Posted: Sat Feb 18, 2023 08:54 PM

hi Marc,

when you want to Enter Data you need "Keyboard" -> OSK

but that need a lot of Space on Screen ... so i have a "Input-Window" and use "Cell-based" Navigation

Touch on a Cell will "jump" to "Input-Window" (right or left Side )

SPIN-Button or Slider are "to small" for Touch so i made Button with -50,-10.-1, OK, +1, +10 and +50

it need less Space and is better to handle on Table-PC

greeting,

Jimmy
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM

Re: Xbrowse and Touchscreen best use

Posted: Sun Feb 19, 2023 08:56 AM
Jimmy wrote:hi Marc,

when you want to Enter Data you need "Keyboard" -> OSK
but that need a lot of Space on Screen ... so i have a "Input-Window" and use "Cell-based" Navigation

Touch on a Cell will "jump" to "Input-Window" (right or left Side )
SPIN-Button or Slider are "to small" for Touch so i made Button with -50,-10.-1, OK, +1, +10 and +50

it need less Space and is better to handle on Table-PC
That input window will have only the num keys, maybe a extra .... key and thats it i think. Is it possible to share the code for that dialog ? I could use it as a starting point.
Marc Venken

Using: FWH 23.08 with Harbour
Posts: 7027
Joined: Fri Oct 07, 2005 07:07 PM

Re: Xbrowse and Touchscreen best use

Posted: Sun Feb 19, 2023 09:29 AM
Marc,
phone.prg could be a starting point.
Best regards,
Otto

PS:comment modem function to get it running
ACTIVATE DIALOG oDlg ;
ON INIT ( oDlg:SetSize( 0, HALF_SIZE ),;
oHangDown:Hide(), oLocalNum:Hide(),; // If( ! lInitModem(), oDlg:End(),),; EnableCommNotification( nComm, oDlg:hWnd, IN_BUFFER, IN_BUFFER )
);
VALID ( CloseComm( nComm ), .t. )


or this demo:
Code (fw): Select all Collapse
*+
*+      "Virtual Keyboard"
#include "FiveWin.ch"
#include "colors.ch"

//----------------------------------------------------------------//
   static m_TextString := ""
   static m_shift := .f.
   static o11,o1,o2,o3,o4,o5,o6,o7,o8,o9,o0,o22,o33,oq,ow,oe,or,ot,oy,ou,oi,oo,op,o44,o55,o66,oa,os,od,off,og,oh,oj,ok,ol,o77,o88,oz,ox,oc,ov,ob,on,om,o99,o111,o222 
   static m_caps :=.f.
   static omessage
   static oDlg

function Keyboard()

    local ofont
    local cTitle := "Virtual Keyboard"

  define font ofont;
    name "ms sans serif";
    size 14,24


   DEFINE DIALOG oDlg FROM 0,0 TO 500,1100 TITLE cTitle pixel font ofont color CLR_BLACK,CLR_BLUE

   ***** UNComment Just One ********
   @1,25 SAY omessage var m_TextString OF oDlg SIZE 250, 16 update border
   //@1,25 GET omessage var m_TextString OF oDlg SIZE 250, 16 
   //@ 1, 25 EDIT omessage VAR m_TextString OF oDlg SIZE 250, 16
   
           @ 205,7 ;
      BTNBMP  ;
      PROMPT "OK" ;
          OF oDlg ;
        FILE ("keyboard_58x28.bmp") ;
      ACTION (MsgInfo(m_TextString), oDlg:End()) ;
        SIZE 58, 28 ;
      ADJUST ;
      CENTER


      @ 50,455 btnbmp prompt "7" OF oDlg SIZE 28, 28 ;
      file("keyboard_28x28.bmp") adjust center ;
     ACTION (m_TextString+="7", omessage:REFRESH()) 

     @ 50, 485 btnbmp prompt "8" OF oDlg SIZE 28, 28 ;
      file("keyboard_28x28.bmp") adjust center ;
      ACTION (m_TextString+="8",omessage:refresh()) 

     @ 50, 515 btnbmp prompt "9" OF oDlg SIZE 28, 28 ;
      file("keyboard_28x28.bmp") adjust center ;
   ACTION (m_TextString+="9",omessage:refresh()) 
     
     @ 80, 455 btnbmp prompt "4" OF oDlg SIZE 28, 28 ;
      file("keyboard_28x28.bmp") adjust center ;
   ACTION (m_TextString+="4",omessage:refresh()) 
     
     @ 80, 485 btnbmp prompt "5" OF oDlg SIZE 28, 28 ;
      file("keyboard_28x28.bmp") adjust center ;
  ACTION (m_TextString+="5",omessage:refresh()) 
     
     @ 80, 515 btnbmp prompt "6" OF oDlg SIZE 28, 28 ;
      file("keyboard_28x28.bmp") adjust center ;
   ACTION (m_TextString+="6",omessage:refresh()) 
     
     @ 110, 455 btnbmp prompt "1" OF oDlg SIZE 28, 28 ;
      file("keyboard_28x28.bmp") adjust center ;
   ACTION (m_TextString+="1",omessage:refresh()) 
     
     @ 110, 485 btnbmp prompt "2" OF oDlg SIZE 28, 28 ;
      file("keyboard_28x28.bmp") adjust center ;
  ACTION (m_TextString+="2",omessage:refresh()) 
     
     @ 110, 515 btnbmp prompt "3" OF oDlg SIZE 28, 28 ;
      file("keyboard_28x28.bmp") adjust center ;
  ACTION (m_TextString+="3",omessage:refresh()) 
     
     @ 50, 5 btnbmp o11 prompt "`" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
    ACTION (iif(m_shift, m_TextString+="~",m_TextString+="`"), unshift(), omessage:refresh()) 
     
     @ 50, 35 btnbmp o1 prompt "1" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+="!",m_TextString+="1"), unshift(), omessage:refresh()) 
     
     @ 50, 65 btnbmp o2 prompt "2" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+="@",m_TextString+="2"), unshift(), omessage:refresh()) 
     
     @ 50, 95 btnbmp o3 prompt "3" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+="#",m_TextString+="3"), unshift(), omessage:refresh()) 
     
     @ 50, 125 btnbmp o4 prompt "4" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="$",m_TextString+="4"), unshift(), omessage:refresh()) 
     
     @ 50, 155 btnbmp o5 prompt "5" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="%",m_TextString+="5"), unshift(), omessage:refresh()) 
     
     @ 50, 185 btnbmp o6 prompt "6" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+="^",m_TextString+="6"), unshift(), omessage:refresh()) 
     
     @ 50, 215 btnbmp o7 prompt "7" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+="&",m_TextString+="7"), unshift(), omessage:refresh()) 
     
     @ 50, 245 btnbmp o8 prompt "8" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="*",m_TextString+="8"), unshift(), omessage:refresh()) 
     
     @ 50, 275 btnbmp o9 prompt "9" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="(",m_TextString+="9"), unshift(), omessage:refresh()) 
     
     @ 50, 305 btnbmp o0 prompt "0" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+=")",m_TextString+="0"), unshift(), omessage:refresh()) 
     
     @ 50, 335 btnbmp o22 prompt "-" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="_",m_TextString+="-"), unshift(), omessage:refresh()) 
     
     @ 50, 365 btnbmp o33 prompt "=" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+="+",m_TextString+="="), unshift(), omessage:refresh()) 
     
     @ 50, 395 btnbmp prompt "BKS" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (m_TextString:=substr(m_TextString,1,len(m_TextString)-1),omessage:refresh()) 
     
     @ 80, 5 btnbmp prompt "TAB" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (m_TextString+="    ",omessage:refresh()) 
     
     @ 80, 35 btnbmp oQ prompt "q" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="Q",m_TextString+="q"), unshift(), omessage:refresh()) 
     
     @ 80, 65 btnbmp ow prompt "w" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="W",m_TextString+="w"), unshift(), omessage:refresh()) 
     
     @ 80, 95 btnbmp oe prompt "e" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="E",m_TextString+="e"), unshift(), omessage:refresh()) 
     
     @ 80, 125 btnbmp or prompt "r" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="R",m_TextString+="r"), unshift(), omessage:refresh()) 
     
     @ 80, 155 btnbmp ot prompt "t" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="T",m_TextString+="t"), unshift(), omessage:refresh()) 
     
     @ 80, 185 btnbmp oy prompt "y" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="Y",m_TextString+="y"), unshift(), omessage:refresh()) 
     
     @ 80, 215 btnbmp ou prompt "u" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+="U",m_TextString+="u"), unshift(), omessage:refresh()) 
     
     @ 80, 245 btnbmp oi prompt "i" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+="I",m_TextString+="i"), unshift(), omessage:refresh()) 
     
     @ 80, 275 btnbmp oo prompt "o" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+="O",m_TextString+="o"), unshift(), omessage:refresh()) 
     
     @ 80, 305 btnbmp op prompt "p" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="P",m_TextString+="p"), unshift(), omessage:refresh()) 
     
     @ 80, 335 btnbmp o44 prompt "[" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="{",m_TextString+="["), unshift(), omessage:refresh()) 
     
     @ 80, 365 btnbmp o55 prompt "]" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="}",m_TextString+="]"), unshift(), omessage:refresh()) 
     
     @ 80, 395 btnbmp o66 prompt "\" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+="|",m_TextString+="\"), unshift(), omessage:refresh()) 
     
     @ 110, 5 btnbmp prompt "Cap" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (docaps()) 
     
     @ 110, 35 btnbmp oa prompt "a" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="A",m_TextString+="a"), unshift(), omessage:refresh()) 
     
     @ 110, 65 btnbmp os prompt "s" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="S",m_TextString+="s"), unshift(), omessage:refresh()) 
     
     @ 110, 95 btnbmp od prompt "d" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="D",m_TextString+="d"), unshift(), omessage:refresh()) 
     
     @ 110, 125 btnbmp off prompt "f" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="F",m_TextString+="f"), unshift(), omessage:refresh()) 
     
     @ 110, 155 btnbmp og prompt "g" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="G",m_TextString+="g"), unshift(), omessage:refresh()) 
     
     @ 110, 185 btnbmp oh prompt "h" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+="H",m_TextString+="h"), unshift(), omessage:refresh()) 
     
     @ 110, 215 btnbmp oj prompt "j" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+="J",m_TextString+="j"), unshift(), omessage:refresh()) 
     
     @ 110, 245 btnbmp ok prompt "k" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="K",m_TextString+="k"), unshift(), omessage:refresh()) 
     
     @ 110, 275 btnbmp ol prompt "l" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="L",m_TextString+="l"), unshift(), omessage:refresh()) 
     
     @ 110, 305 btnbmp o77 prompt ";" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
 ACTION (iif(m_shift, m_TextString+=":",m_TextString+=";"), unshift(), omessage:refresh()) 
     
     @ 110, 335 btnbmp o88 prompt "'" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
 ACTION (iif(m_shift, m_TextString+='"',m_TextString+="'"), unshift(), omessage:refresh()) 
     
     @ 110, 365 btnbmp prompt "Enter" OF oDlg SIZE 58, 28 ;
          file("keyboard_58x28.bmp") adjust center ;
  ACTION oDlg:End() 
     
     @ 140, 5 btnbmp prompt "Shift" OF oDlg SIZE 58, 28 ;
          file("keyboard_58x28.bmp") adjust center ;
  ACTION (doshift()) 
     
     @ 140, 65 btnbmp oz prompt "z" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+="Z",m_TextString+="z"), unshift(), omessage:refresh()) 
     
     @ 140, 95 btnbmp ox prompt "x" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
    ACTION (iif(m_shift, m_TextString+="X",m_TextString+="x"), unshift(), omessage:refresh()) 
     
     @ 140, 125 btnbmp oc prompt "c" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="C",m_TextString+="c"), unshift(), omessage:refresh()) 
     
     @ 140, 155 btnbmp ov prompt "v" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="V",m_TextString+="v"), unshift(), omessage:refresh()) 
     
     @ 140, 185 btnbmp ob prompt "b" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
   ACTION (iif(m_shift, m_TextString+="B",m_TextString+="b"), unshift(), omessage:refresh()) 
     
     @ 140, 215 btnbmp on prompt "n" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="N",m_TextString+="n"), unshift(), omessage:refresh()) 
     
     @ 140, 245 btnbmp om prompt "m" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="M",m_TextString+="m"), unshift(), omessage:refresh()) 
     
     @ 140, 275 btnbmp o99 prompt "," OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="<",m_TextString+=","), unshift(), omessage:refresh()) 
     
     @ 140, 305 btnbmp o111 prompt "." OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
 ACTION (iif(m_shift, m_TextString+=">",m_TextString+="."), unshift(), omessage:refresh()) 
     
     @ 140, 335 btnbmp o222 prompt "/" OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (iif(m_shift, m_TextString+="?",m_TextString+="/"), unshift(), omessage:refresh()) 
     
     @ 140, 365 btnbmp prompt "Shift" OF oDlg SIZE 58, 28 ;
          file("keyboard_58x28.bmp") adjust center ;
   ACTION (doshift()) 
     
     @ 140, 455 btnbmp prompt "0" OF oDlg SIZE 58, 28 ;
          file("keyboard_58x28.bmp") adjust center ;
  ACTION (m_TextString+="0",omessage:refresh()) 
     
     @ 140, 515 btnbmp prompt "." OF oDlg SIZE 28, 28 ;
          file("keyboard_28x28.bmp") adjust center ;
  ACTION (m_TextString+=".",omessage:refresh()) 
     
     @ 170, 120 btnbmp prompt "Space" OF oDlg SIZE 165, 28 ;
          file("keyboard_165x28.bmp") adjust center ;
  ACTION (m_TextString+=" ",omessage:refresh()) 
     

  ***** Comment out for GET and EDIT **********  
  oDlg:bKeyDown := { | nKey | KEYSEEK(nKey)}
     
   
   
   ACTIVATE DIALOG oDlg CENTERED

return(m_TextString)


*+??????????????????????????????????
*+
*+    Function KeySeek()
*+
*+??????????????????????????????????
*+
Function KeySeek( nKey )


MsgInfo(STR(nKey,3)+"   |"+Chr(nKey)+"|")

omessage:SetFocus()
if nKey = 8         // Backup on BackSpace Key
    m_TextString:=substr(m_TextString,1,len(m_TextString)-1)
    omessage:Refresh()
//elseif ( nKey > 64 .and. nKey < 91 ) .or. ( nKey > 96 .and. nKey < 123 ) .or. ;
//             ( nKey = 32 )              // Check for valid keys ONLY
//    m_TextString := m_TextString + chr( nKey )
//    omessage:Refresh()
elseif ( nKey == 27 )
    m_TextString := ""
    omessage:Refresh()
elseif ( nKey == 13 )
    oDlg:end()
else
   m_TextString += Chr(nKey)
   omessage:Refresh()
endif

return .T.




function docaps()
if m_caps=.f.
    m_caps:=.t.
    doshift()
else
    m_caps:=.f.
    unshift()
end if
return .t.

function doshift()
m_shift:=.t.
o11:settext("~")
o1:settext("!")
o2:settext("@")
o3:settext("#")
o4:settext("$")
o5:settext("%")
o6:settext("^")
o7:settext("&&")
o8:settext("*")
o9:settext("(")
o0:settext(")")
o22:settext("_")
o33:settext("+")
oq:settext("Q")
ow:settext("W")
oe:settext("E")
or:settext("R")
ot:settext("T")
oy:settext("Y")
ou:settext("U")
oi:settext("I")
oo:settext("O")
op:settext("P")
o44:settext("{")
o55:settext("}")
o66:settext("|")
oa:settext("A")
os:settext("S")
od:settext("D")
off:settext("F")
og:settext("G")
oh:settext("H")
oj:settext("J")
ok:settext("K")
ol:settext("L")
o77:settext(":")
o88:settext('"')
oz:settext("Z")
ox:settext("X")
oc:settext("C")
ov:settext("V")
ob:settext("B")
on:settext("N")
om:settext("M")
o99:settext("<")
o111:settext(">")
o222:settext("?")
o11:refresh()
o1:refresh()
o2:refresh()
o3:refresh()
o4:refresh()
o5:refresh()
o6:refresh()
o7:refresh()
o8:refresh()
o9:refresh()
o0:refresh()
o22:refresh()
o33:refresh()
oq:refresh()
ow:refresh()
oe:refresh()
or:refresh()
ot:refresh()
oy:refresh()
ou:refresh()
oi:refresh()
oo:refresh()
op:refresh()
o44:refresh()
o55:refresh()
o66:refresh()
oa:refresh()
os:refresh()
od:refresh()
off:refresh()
og:refresh()
oh:refresh()
oj:refresh()
ok:refresh()
ol:refresh()
o77:refresh()
o88:refresh()
oz:refresh()
ox:refresh()
oc:refresh()
ov:refresh()
ob:refresh()
on:refresh()
om:refresh()
o99:refresh()
o111:refresh()
o222:refresh()
return .t.

function unshift()
if m_caps=.t.
    m_shift:=.t.
    return .t.
else 
    m_shift:=.f.
end if
o11:settext("`")
o1:settext("1")
o2:settext("2")
o3:settext("3")
o4:settext("4")
o5:settext("5")
o6:settext("6")
o7:settext("7")
o8:settext("8")
o9:settext("9")
o0:settext("0")
o22:settext("-")
o33:settext("=")
oq:settext("q")
ow:settext("w")
oe:settext("e")
or:settext("r")
ot:settext("t")
oy:settext("y")
ou:settext("u")
oi:settext("i")
oo:settext("o")
op:settext("p")
o44:settext("[")
o55:settext("]")
o66:settext("\")
oa:settext("a")
os:settext("s")
od:settext("d")
off:settext("f")
og:settext("g")
oh:settext("h")
oj:settext("j")
ok:settext("k")
ol:settext("l")
o77:settext(";")
o88:settext("'")
oz:settext("z")
ox:settext("x")
oc:settext("c")
ov:settext("v")
ob:settext("b")
on:settext("n")
om:settext("m")
o99:settext(",")
o111:settext(".")
o222:settext("/")
o11:refresh()
o1:refresh()
o2:refresh()
o3:refresh()
o4:refresh()
o5:refresh()
o6:refresh()
o7:refresh()
o8:refresh()
o9:refresh()
o0:refresh()
o22:refresh()
o33:refresh()
oq:refresh()
ow:refresh()
oe:refresh()
or:refresh()
ot:refresh()
oy:refresh()
ou:refresh()
oi:refresh()
oo:refresh()
op:refresh()
o44:refresh()
o55:refresh()
o66:refresh()
oa:refresh()
os:refresh()
od:refresh()
off:refresh()
og:refresh()
oh:refresh()
oj:refresh()
ok:refresh()
ol:refresh()
o77:refresh()
o88:refresh()
oz:refresh()
ox:refresh()
oc:refresh()
ov:refresh()
ob:refresh()
on:refresh()
om:refresh()
o99:refresh()
o111:refresh()
o222:refresh()
return .t.
Posts: 1799
Joined: Thu Sep 05, 2019 05:32 AM

Re: Xbrowse and Touchscreen best use

Posted: Sun Feb 19, 2023 09:38 AM

hi Marc,

forgot to say that i have such Solution under Xbase++, not Fivewin yet sorry

but it is easy for your Problem just a "Numpad" with Button.

add "Number" from Button to a Sting and show Num-Value in GET Field

greeting,

Jimmy
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM

Re: Xbrowse and Touchscreen best use

Posted: Sun Feb 19, 2023 10:40 AM

Jimmy,

Just curious (I've I may)

Your are a Xbase++ programmer. Is FWH a addon kind off thing for a Xbase programmer or are there more interesting features in FWH.

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM

Re: Xbrowse and Touchscreen best use

Posted: Sun Feb 19, 2023 10:49 AM

Thanks... This is not that hard to make )))

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 1799
Joined: Thu Sep 05, 2019 05:32 AM

Re: Xbrowse and Touchscreen best use

Posted: Mon Feb 20, 2023 06:57 AM
hi Marc,
Marc Venken wrote:Your are a Xbase++ programmer. Is FWH a addon kind off thing for a Xbase programmer or are there more interesting features in FWH.
after 20 Year using Xbase++ i have change to harbour while i do not want to go "slow" Way of Alaska any more
Xbase++ still use 32 Bit, ANSI / OEM and use 1 x CPU "only" ... :roll:

when Windows 11 arrive there was no 32 Bit Version any more so it was Time to change also to 64 Bit
i want to use 64 Bit and Unicode Apps and found HMG "out-of-the-box" Packet 4 Years ago

last Year i have begin (again) with Fivewin while now get to that Level and "understand" how to work under harbour
but i still have to learn a lot of Fivewin ( e.g. how to use Debugger to "jump" to ALTD() instead of Step with F8 )
greeting,

Jimmy
Posts: 7027
Joined: Fri Oct 07, 2005 07:07 PM

Re: Xbrowse and Touchscreen best use

Posted: Mon Feb 20, 2023 08:19 AM

Jimmy, I'm so glad you're here in our Fivewin group.

Thank you so much for all your hard work.

Best regards,

Otto

Posts: 45
Joined: Thu Jul 13, 2006 12:20 AM

Re: Xbrowse and Touchscreen best use

Posted: Tue Oct 27, 2026 07:59 PM

Dear Group,
I am currently testing a Virtual Keyboard, and upon reviewing the code, I noticed two files: keyboard_28x28.bmp and keyboard_58x28.bmp.
Could you please provide these files?
Thank you for your help.
cjcardoza

Posts: 269
Joined: Fri Sep 25, 2026 01:40 AM

Re: Xbrowse and Touchscreen best use

Posted: Tue Oct 27, 2026 09:23 PM

cjcardoza,

Here is a newly generated replacement set for the keyboard example. These are NOT Otto's original bitmaps.

The ZIP contains three blank button backgrounds:

  • keyboard_28x28.bmp (28 x 28 pixels)
  • keyboard_58x28.bmp (58 x 28 pixels)
  • keyboard_165x28.bmp (165 x 28 pixels, for Space)

Extract the BMP files into the folder from which the example loads them, keeping their names unchanged. The example adds the key labels through PROMPT; the labels are not part of these BMP files.

The attached image is a simulated preview using the new backgrounds, NOT a screenshot of the running FWH example. Test update: Otto's complete example was run under Wine with an FWH64 test kit. All three BMP files loaded, and clicks on letters, numbers, Space, Caps, Shift, BKS, OK and Enter were checked. Visual appearance is NOT validated: the test showed misaligned borders, text-spacing problems and invisible TAB/BKS labels. A flat-background control test retained several of these problems, so they cannot be attributed solely to the BMP files. Test adaptations were limited to nonbreaking spaces, a separate launcher and kit startup compatibility; button actions, sizes, PROMPT and FILE settings were unchanged.

Simulated preview of the new backgrounds (labels supplied separately):

📎 keyboard_replacements_simulated_preview.png
Posts: 269
Joined: Fri Sep 25, 2026 01:40 AM

Re: Xbrowse and Touchscreen best use

Posted: Tue Oct 27, 2026 09:34 PM

cjcardoza,

The appearance is now improved in an adapted version of Otto's example. This is a REAL screenshot from the Wine/FWH64 test, not a simulation:

📎 keyboard_otto_adapted_wine.png

The three BMP files are unchanged. The improvement is in the example settings:

  1. Change the font from SIZE 14,24 to SIZE 0,-16.
  2. Supply the same BMP for both button states in FILE.
  3. Add NOBORDER to avoid drawing a second frame around the bitmap's own border.

For example:

FILE ("keyboard_28x28.bmp"), ("keyboard_28x28.bmp") ADJUST CENTER NOBORDER

Use the corresponding filename for the 58x28 and 165x28 backgrounds. The button actions, labels and geometry were preserved; no FWH framework changes were needed.

Selected clicks were rechecked: letters, numbers, Space, Caps, Shift and BKS, plus OK returning the entered text and Enter closing the dialog. This is a partial Wine/FWH64 test of an adapted example, not validation of every key, native Windows, other FWH versions or all DPI settings. The test also used whitespace cleanup, a separate launcher and kit startup compatibility adjustments.

The following PNG images are pixel-faithful display copies of the SAME newly generated BMP backgrounds, not Otto's original files. Labels are supplied by PROMPT, so the backgrounds are blank.

28 x 28:

📎 keyboard_28x28.png

58 x 28:

📎 keyboard_58x28.png

165 x 28 (Space):

📎 keyboard_165x28.png

Downloads from FiveTechSoft/FWH_tools:
keyboard_bmps.zip - the three BMP backgrounds
otto_improved.prg - adapted example source

Adapted from Otto's original example. The PRG normalizes 920 nonbreaking spaces, changes the font as above and applies the same second bitmap state and NOBORDER to all 66 buttons. Actions, labels, geometry and BMP files are unchanged.

The PRG defines Keyboard() and its helpers, but does not include Main(). Call Keyboard() from your application's entry point. The original KeySeek() debug MsgInfo is retained, so physical-key input may open a debug message; that input path was not exhaustively tested. The Wine test used a separate launcher, not included in this PRG.

Posts: 45
Joined: Thu Jul 13, 2006 12:20 AM

Re: Xbrowse and Touchscreen best use

Posted: Tue Oct 27, 2026 10:43 PM

Thank you for your help; I managed to run the example. If it’s not too much trouble, could you provide an example of a dialog that uses the Keyboard() function to capture input from the virtual keyboard into a variable?

Posts: 269
Joined: Fri Sep 25, 2026 01:40 AM

Re: Xbrowse and Touchscreen best use

Posted: Tue Oct 27, 2026 10:59 PM

cjcardoza,

Yes. Keyboard() returns m_TextString when its modal dialog closes. Assign that return value to the variable bound to your GET, then refresh the GET:

#include "FiveWin.ch"

// Caller for Otto's Keyboard() function. Compile/link with otto_improved.prg.
FUNCTION CallerDemo()
   LOCAL oDlg, oGet, oFont
   LOCAL cText := Space( 80 )

   DEFINE FONT oFont NAME "Arial" SIZE 0, -16
   DEFINE DIALOG oDlg TITLE "Keyboard return value" ;
      FROM 0, 0 TO 320, 840 PIXEL FONT oFont

   @ 12, 12 GET oGet VAR cText OF oDlg SIZE 390, 24 PIXEL
   @ 50, 12 BUTTON "Keyboard" OF oDlg SIZE 110, 28 PIXEL ;
      ACTION ( cText := PadR( Keyboard(), 80 ), oGet:Refresh() )
   @ 95, 12 BUTTON "Show variable" OF oDlg SIZE 130, 28 PIXEL ;
      ACTION MsgInfo( AllTrim( cText ), "cText" )
   @ 95, 280 BUTTON "Close" OF oDlg SIZE 100, 28 PIXEL ;
      ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont
RETURN cText

Compile/link this caller together with otto_improved.prg. Call CallerDemo() from your existing Main()/WinMain entry point. PadR() keeps cText at the GET's 80-character length; AllTrim(cText) removes that padding when you use the value.

This exact caller was tested with the adapted keyboard under Wine/FWH64: clicking q, 7, Space and e, then OK and closing the keyboard's own MsgInfo, returned "q7 e" to the parent GET. "Show variable" displayed the same value. Reopening and closing with Enter was also checked. The screenshot below is from that real test.

Keyboard opened from this caller, with "q7 e" entered (real Wine/FWH64 screenshot):

📎 caller_keyboard_open_wine.png

After closing the keyboard, the returned value is visible in the caller's GET:

📎 keyboard_returned_to_GET_wine.png

Important limitations of the current Keyboard() implementation:

  • Its static m_TextString retains the previous keyboard input when reopened; it does not automatically import existing text from the caller's GET.
  • It does not distinguish Accept from Cancel. The original OK button also shows MsgInfo before returning.
  • The dialog size shown was tested in this Wine/FWH64 kit, not across all FWH versions, native Windows or DPI settings.
Posts: 2710
Joined: Fri Oct 07, 2005 01:50 PM

Re: Xbrowse and Touchscreen best use

Posted: Fri Oct 30, 2026 03:58 PM

Let me be honest and blunt here .. touch screens are more of a pain in the aspercream .. being in the Computer repair store business as well as custom application programming .. When a touch screen laptop comes in I ask the user if I can disable the touch screen and usually the Customers answer is a resounding YES.

Go to the device manager and under Display adapters and you should see the Touch Screen driver ... just right click on the touch screen and Disable .. and life will be just fine with out the touch screen ..

Rick Lipkin

Continue the discussion