FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Objects in Dialog
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Objects in Dialog
Posted: Sat May 17, 2008 02:14 AM

How to know if user changed any get object's value within the dialog?

Any working sample please....

Regards,

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: Objects in Dialog
Posted: Sat May 17, 2008 02:30 AM
fraxzi wrote:How to know if user changed any get object's value within the dialog?

Any working sample please....


Regards,


Hi

Try to use Valid command to control GET Object value.

Regards,

richard
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Objects in Dialog
Posted: Sat May 17, 2008 02:54 AM

Thanks for the reply :)

I resorted to old fashioned solution.... I put function after 'ON CHANGE' on every GET objects... and enable the save button if there are changes...

I was hoping that there is a function which has return (boolean) if any object's value was changed within the said dialog.

Thank you!

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Objects in Dialog
Posted: Sat May 17, 2008 03:13 AM

>I resorted to old fashioned solution.... I put function after 'ON CHANGE' on every GET objects... and enable the save button if there are changes...

I think this is the only way to do it.

>I was hoping that there is a function which has return (boolean) if any object's value was changed within the said dialog.

Even if there was such a function, you would still have to call it from the ON CHANGE clause of each control.

Still this method is not foolproof as the user could change something, then change it back to the original data and the Save button would still be enabled. I know, you are thinking that they could just press the Cancel button, and that is true but there is a visual indication that something has changed, when it hasn't.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Objects in Dialog
Posted: Sat May 17, 2008 05:31 AM

You are absolutely right Mr. James! 8)

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Objects in Dialog
Posted: Sat May 17, 2008 08:02 AM

Frances,

You could try this:

if AScan( oDialog:aControls, { | o | Upper( o:ClassName() ) == "TGET" .and. o:oGet:changed .and. ( o:oGet:VarGet() != o:oGet:Original ) } ) != 0

MsgInfo( "Gets changed" )

endif

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Objects in Dialog
Posted: Sat May 17, 2008 08:50 AM

Thanks Mr. Antonio! :D

That's a brilliant approach 8)

Regards,

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15

Continue the discussion