pfc_itemfocuschanged


pfcdwsrv.pbl   >   pfc_n_cst_dwsrv_dropdownsearch   >   pfc_itemfocuschanged   

Full name pfc_n_cst_dwsrv_dropdownsearch.pfc_itemfocuschanged
Access public
Extend of
Return value
Prototype event pfc_itemfocuschanged(long,ref dwobject)

Name Datatype
No Data

Name Datatype
li_index int
ls_ddlb_displaydatavalue string
ls_ddlb_displayvalue string
ls_dwcolname string
ls_editstyle string

event pfc_itemfocuschanged;//////////////////////////////////////////////////////////////////////////////
//
//	Event:  		pfc_itemfocuschanged
//
//	Arguments:
//	al_row:  	row number
//	adwo_obj:  	DataWindow object passed by reference
//	
//
//	Returns:   	none 
//
//	Description:	This event is fired from the itemfocuschanged event. 
//						It will set an index based on the loacation of the current
//						column in the array.  Also, it will make sure the column is
//						of type dddw or ddlb and set a flag to indicate so.
//
//////////////////////////////////////////////////////////////////////////////
//	
//	Revision History
//
//	Version
//	5.0   Initial version
// 6.0	Added argument validation.
// 7.0 	Due to an invalid test for  ls_editstyle = 'dddw' the service was unable 
//			to recover the child handle.  
//			Changed  the test from ls_editstyle <> 'dddw' to  ls_editstyle = 'dddw'
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1999 Sybase, Inc. and its subsidiaries.  All rights reserved.
//	Any distribution of the PowerBuilder Foundation Classes (PFC)
//	source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////

string	ls_editstyle
string 	ls_dwcolname
string	ls_ddlb_displaydatavalue, ls_ddlb_displayvalue
int		li_index

// Initialize values.
ib_performsearch = False
ii_currentindex = 0
is_textprev = ''

// Validate arguments.
If IsNull(adwo_object) or Not IsValid(adwo_object) Then Return
If IsNull(al_row) or al_row <= 0 Then Return

// Check the column type.
ls_editstyle = adwo_object.Describe('Edit.Style')
if ls_editstyle <> "dddw" And ls_editstyle <> "ddlb" THEN Return

// Get column name.
ls_dwcolname = adwo_object.Name

// Check if column is in the search column array.
li_index = of_SearchItem(ls_dwcolname)
If li_index <= 0 Then Return

//////////////////////////////////////////////////////////////////////////////
// The current column is of type DDDW or DDLB and is found on the array.
//////////////////////////////////////////////////////////////////////////////

// Store the variable that says OK to perform search.
ib_performsearch = True

// Store the current index.
ii_currentindex = li_index

// Store the previous text information.
If ls_editstyle = 'dddw' Then
	is_textprev = idw_requestor.GetText()
Else
	ls_ddlb_displaydatavalue = idw_requestor.GetValue(ls_dwcolname, al_row)
	ls_ddlb_displayvalue = Left(ls_ddlb_displaydatavalue, Pos(ls_ddlb_displaydatavalue, '~t') -1)
	is_textprev = ls_ddlb_displayvalue
End If

// If a DDDW, Validate the dddw object.  If Not Valid, get it now.
If ls_editstyle = 'dddw' Then
	If IsNull(inv_columns[li_index].dwc_object) Or &
		Not isValid(inv_columns[li_index].dwc_object) Then
		adwo_object.getchild(ls_dwcolname, inv_columns[li_index].dwc_object) 
	End If
End If

end event

     
Name Owner
pfc_w_filtersimple.dw_filter.itemfocuschanged dw_filter

     
Name Owner
datawindow.gettext datawindow
datawindow.getvalue datawindow
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.left systemfunctions
systemfunctions.pos systemfunctions
pfc_n_cst_dwsrv_dropdownsearch.of_searchitem pfc_n_cst_dwsrv_dropdownsearch

     
Full name
No Data

     
Name Scope
No Data