Page 1 of 1

Ancora problemi cambiando la get picture at runtime

Posted: Thu Feb 12, 2009 9:07 pm
by Marco Turco
Ciao a tutti, ho la necessità di cambiare la picture di una get da euro a lire at runtime.
Il problema è che il cambio avviene ma appena ci clicco sopra con il mouse mi riappare con il precedente formato.
Qualche idea ?

Ecco il codice che evidenzia il problema.
Provate a selezionare "Lire picture". La picture della get cambia ma quando ci clicco sopra torna ad essere nel formato 9999.99



// Testing a GET editing a number

#include "FiveWin.ch"

//----------------------------------------------------------------------------//



function Main()

local oDlg, oBtn, nTest, cPicture, oTest1

nTest:=0
cPicture:="9999.99"

DEFINE DIALOG oDlg TITLE "A simple GET" ;
FROM 2, 2 TO 13, 40

@ 10, 10 GET oTEST1 VAR nTest SIZE 120, 13 pixel OF oDlg RIGHT PICTURE cPicture

@ 3, 4 BUTTON oBtn PROMPT "Euro picture" SIZE 45, 12 OF oDlg ;
ACTION ( oTest1:oGet:Picture:="9999.99", oTest1:Refresh())

@ 3, 14 BUTTON "Lire picture" SIZE 45, 12 OF oDlg ;
ACTION ( oTest1:oGet:Picture:="999999", oTest1:Refresh())

ACTIVATE DIALOG oDlg CENTERED

return nil

Re: Ancora problemi cambiando la get picture at runtime

Posted: Thu Feb 12, 2009 9:31 pm
by Enrico Maria Giordano

Code: Select all

// Testing a GET editing a number

#include "FiveWin.ch"

//----------------------------------------------------------------------------//



function Main()

local oDlg, oBtn, nTest, cPicture, oTest1

nTest:=0
cPicture:="9999.99"

DEFINE DIALOG oDlg TITLE "A simple GET" ;
FROM 2, 2 TO 13, 40

@ 10, 10 GET oTEST1 VAR nTest SIZE 120, 13 pixel OF oDlg RIGHT PICTURE cPicture

@ 3, 4 BUTTON oBtn PROMPT "Euro picture" SIZE 45, 12 OF oDlg ;
ACTION ( oTest1:oGet:Picture:="9999.99", oTest1:cPicture:="9999.99", oTest1:Refresh())

@ 3, 14 BUTTON "Lire picture" SIZE 45, 12 OF oDlg ;
ACTION ( oTest1:oGet:Picture:="999999", oTest1:cPicture:="999999", oTest1:Refresh())

ACTIVATE DIALOG oDlg CENTERED

return nil
EMG

Re: Ancora problemi cambiando la get picture at runtime

Posted: Sun Feb 15, 2009 1:24 pm
by Marco Turco
Ok. Grazie.