NUMBER_Null

forum.sourcecode (2000-2005) & forum.td.sourcecode (2005-2010)
Sandra

NUMBER_Null

Post by Sandra » 10 Aug 2006, 12:03

 Posted by:  Sandra 

I need a function for set all datafield of zero when the field is
'NUMBER_Null ' .

Set hWnd = SalGetFirstChild( hWndForm, TYPE_DataField )
While hWnd != hWndNULL
???????????
when the datfield is Number_Null the set 0 in this datfield

Set hWnd = SalGetNextChild( hWnd, TYPE_DataField )

Armin Pokorny

Re: NUMBER_Null

Post by Armin Pokorny » 10 Aug 2006, 12:17

 Posted by:  Armin Pokorny 

Set hWndChild = SalGetFirstChild( hWndForm, TYPE_DataField )
While hWndChild
If SalGetDataType( hWndChild ) = DT_Number and SalIsNull( hWndChild )
Call SalSetWindowText( hWndChild, '0' )
Set hWndChild = SalGetNextChild( hWndChild, TYPE_DataField )

Jim McNamara

Re: NUMBER_Null

Post by Jim McNamara » 10 Aug 2006, 17:02

 Posted by:  Jim McNamara 

Why not create a data field class that sets the value to 0 on SAM_Create?

Data Field Class: c_dfNumberInitToZero
...
Message Actions:
On SAM_Create
Set MyValue = 0

Return to “td.sourcecode”

Who is online

Users browsing this forum: No registered users and 0 guests