Change field in get

Change field in get

Postby Marc Vanzegbroeck » Fri Mar 16, 2012 8:03 am

Hello,

How can I change a getfield in a dialog on the fly?

I have a code like

Code: Select all  Expand view
REDEFINE GET ovar VAR artikel->omschrijv   ID 202 OF oDlg


I want to change artikel->omschrijv to artikel->omschrijv1 when I press a button.

I have try
ovar:oGet:bSETGET( artikel->omschrijv1)

but get an compile error

Thanks,
Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Change field in get

Postby Rick Lipkin » Fri Mar 16, 2012 12:47 pm

Marc

I would assign your database field to a variable then with your button, re-assign the variable then refresh your object ..

Something like this :

Code: Select all  Expand view


cOmschrijv := artikel->omschrijv

REDEFINE GET oVar VAR cOmschrijv   ID 202 OF oDlg

Redefine button oBtn PROMPT "Change" ;
            ACTION( cOmschrijv := artikel->omschrijv1, oVar:ReFresh(), SysReFresh(), oVar:SetFocus() )

 


Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Change field in get

Postby Marc Vanzegbroeck » Fri Mar 16, 2012 12:57 pm

Rick,

Thanks for your reply.
I just found an other way.

Code: Select all  Expand view
ovar:oget:block := bSETGET(artikel->omschrijv1)
ovar:ReFresh()


Regards,
Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 93 guests