Well this code is working fine for me.
James
- Code: Select all Expand view
- /*
Purpose: Test changing picture clause
Problem: Last digit is zero regardless of what you type (oGet[2])
Date : 5/17/2013
Source : viewtopic.php?f=3&t=26282&p=144993#p144993
*/
#include "fivewin.ch"
****************************************************************************
FUNCTION Main()
****************************************************************************
Local oDlgMsg
Local oGet := Array(2), cGet := Array(2)
cGet[1] := Space(10)
cGet[2] := 1
DEFINE DIALOG oDlgMsg;
FROM 10, 20 TO 20, 60
@ 1.6, 2.0 GET oGet[1];
Var cGet[1];
picture "@!";
SIZE 80, 12;
OF oDlgMsg;
Valid ChangePicture(oGet)
@ 2.6, 2.0 GET oGet[2];
Var cGet[2];
picture "99,999.99";
SIZE 80, 12;
OF oDlgMsg;
UPDATE
@ 3.6, 14.0 ButtonBmp;
SIZE 45, 13;
ACTION oDlgMsg:End();
OF oDlgMsg;
TEXTRIGHT;
prompt "Exit"
oDlgMsg:lHelpIcon := .f.
ACTIVATE DIALOG oDlgMsg CENTERED
RETURN nil
/*------------------------------------------------------------------------*/
Function ChangePicture(oGet)
Local cPicture := "99,999.999"
oGet[2]:cPicture := cPicture
oGet[2]:oGet:Picture := cPicture
oGet[2]:Refresh()
msgbeep()
Return .T.