FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Changing a get picture at runtime
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Changing a get picture at runtime
Posted: Tue Jan 20, 2009 09:45 AM

Hi all,
I'm trying to change a get picture at runtime but unsuccessfully.

In this self-contained sample I have a get initialized with a euro picture (9999.99),
then pressing the "Lire picture" button I would like to change the picture in the 999999 format but it doesn't change.

Any suggest ?

Thanks in advance.

function Main()

local oDlg, oGet, oBtn

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 ( cPicture:="9999.99", oTest1:Refresh())

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

ACTIVATE DIALOG oDlg CENTERED

return nil

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 80
Joined: Tue Mar 25, 2008 09:03 PM
Re: Changing a get picture at runtime
Posted: Tue Jan 20, 2009 10:21 AM

Ciao,
Io ho risolto così

@10,1.5 GET oImpdef VAR cImpdef OF oDlg picture if(euro = 1,"@E 99,999,999.99","@E 9,999,999,999") valid somma() SIZE 50,10

Stefano

FWH 14.11 + xHarbour + bcc582
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Changing a get picture at runtime
Posted: Tue Jan 20, 2009 10:28 AM
Oppure

ACTION ( oTest1:oGet:Picture:="999999", oTest1:Refresh())


EMG
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Changing a get picture at runtime
Posted: Tue Jan 20, 2009 11:44 AM
Enrico Maria Giordano wrote:Oppure

ACTION ( oTest1:oGet:Picture:="999999", oTest1:cPicture:="999999", oTest1:Refresh())

:-)
EMG
Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Changing a get picture at runtime
Posted: Tue Jan 20, 2009 12:59 PM

Please, take the time to try the suggestions. There's no need to assign cPicture property.

EMG

Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: Changing a get picture at runtime
Posted: Tue Jan 20, 2009 10:08 PM

Hi Enrico,
your solution give me an "message not found" error in the tget class.
The only running solution I have found is the following but there is a problem with the picture refresh. The picture change only when I select the get with the mouse.

Any ideas ?


Function Main()
local oDlg, oGet, oBtn
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:cPicture:="9999.99", oTest1:Refresh())

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

ACTIVATE DIALOG oDlg CENTERED

return nil

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Changing a get picture at runtime
Posted: Tue Jan 20, 2009 10:58 PM
The following sample works fine here:

#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


EMG
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: Changing a get picture at runtime
Posted: Wed Jan 21, 2009 06:46 PM

Yes. It runs fine.

Thanks a lot.

Best Regards,



Marco Turco

SOFTWARE XP LLP

Continue the discussion