// Purpose: Show simulated backspace for a GET
// Author : James Bott
// Date : 5/5/2013
#include "fivewin.ch"
function Main()
local oDlg, cVar, oGet, oBtn
cVar:="12345 "
define dialog oDlg
@ 2,2 get oGet var cVar of oDlg
@ 3,2 button oBtn ;
action (oGet:oGet:varPut( left( oGet:oGet:varGet(),len( rtrim(oGet:oGet:varGet()) )-1) ), oGet:refresh() )
activate dialog oDlg center
return nil
// Purpose: Show simulated backspace for a GET
// Author : James Bott
// Date : 5/5/2013
#include "fivewin.ch"
#include "vKey.ch" // Don't forget this line
function Main()
local oDlg, cVar, oGet, oBtn
cVar:="12345 "
define dialog oDlg
@ 2,2 get oGet var cVar of oDlg
@ 3,2 button oBtn ;
action Teclado(oDlg,VK_BACK,1)
activate dialog oDlg center
return nil
/*
* -------------------------------------------------------------------------*
* -------------------------------------------------------------------------*
*/
FUNCTION Teclado(oDlg,nKey,nTimes)
LOCAL nTime
DEFAULT nTimes := 1
oDlg:SETFOCUS()
FOR nTime := 1 TO nTimes
oDlg:POSTMSG(WM_KEYDOWN,nKey,0)
NEXT
RETURN (NIL)
@ 1.3,1 BUTTON oBtn PROMPT "<-" OF oDlg ACTION(oGet:oGet:varPut(left(oGet:oGet:varGet(),len(rtrim(oGet:oGet:varGet())-1)))) FONT oFont SIZE 38,10
Application
===========
Path and name: C:\Work\Prg\msgcalc\msgcalc.Exe (32 bits)
Size: 2,137,088 bytes
Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6715)
FiveWin Version: FWHX 12.03
Windows version: 6.1, Build 7600
Time from start: 0 hours 0 mins 5 secs
Error occurred at: 05/06/13, 18:52:15
Error description: Error BASE/1082 Argument error: -
Args:
[ 1] = C 123456
[ 2] = N 1
Stack Calls
===========
Called from: msgcalc.prg => (b)MSGCALC( 126 )
Called from: .\source\classes\BUTTON.PRG => TBUTTON:CLICK( 157 )
Called from: .\source\classes\CONTROL.PRG => TBUTTON:HANDLEEVENT( 1654 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3153 )
Called from: => SENDMESSAGE( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:COMMAND( 379 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 886 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 270 )
Called from: msgcalc.prg => MSGCALC( 369 )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: jmartial and 114 guests