|
pfc_propertypopulate
|
|
Full name
|
pfc_u_tabpg_dwproperty_srvsort.pfc_propertypopulate
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
event integer pfc_propertypopulate()
|
Name
|
Datatype
|
li_cntall
|
integer
|
li_cntexc
|
integer
|
li_index
|
integer
|
li_rc
|
integer
|
li_style
|
integer
|
li_upperall
|
integer
|
li_upperexc
|
integer
|
ls_allcols
|
string[]
|
ls_excludecols
|
string[]
|
event pfc_propertypopulate;call super::pfc_propertypopulate;//////////////////////////////////////////////////////////////////////////////
//
// Function: pfc_properypopulate
//
// Access: Public
//
// Arguments: None
//
// Returns: Integer
// 1 if it succeeds.
// -1 if an error occurs.
//
// Description:
// Populate the screen edit controls with the current service values.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 6.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 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.
//
//////////////////////////////////////////////////////////////////////////////
integer li_upperall, li_upperexc
integer li_cntall, li_cntexc
integer li_rc
integer li_style
integer li_index
string ls_allcols[]
string ls_excludecols[]
// Validate references.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
Return -1
End If
If IsNull(idw_requestor.inv_sort) or Not IsValid(idw_requestor.inv_sort) Then
Return -1
End If
// Get the current dialog style.
li_style = idw_requestor.inv_sort.of_GetStyle()
// The style attributes start at 0, the ddlb index start at 1.
ii_style = li_style + 1
li_rc = ddlb_style.SelectItem(ii_style)
// Determine if column header is enabled.
cbx_columnheader.Checked = idw_requestor.inv_sort.of_GetColumnHeader()
// Determine the Header suffix.
sle_headersuffix.Text = idw_requestor.inv_sort.of_GetDefaultHeaderSuffix()
// Determine if Visible Only columns is enabled.
cbx_visibleonly.Checked = idw_requestor.inv_sort.of_GetVisibleOnly()
// Determine if Use Display Values for Sorting is enabled.
cbx_usedisplayvalue.Checked = idw_requestor.inv_sort.of_GetUseDisplay()
// Get all the columns from which the sort service could sort.
li_rc = idw_requestor.inv_sort.of_GetRegisterable(ls_allcols)
// Get all the exclude columns.
li_rc = idw_requestor.inv_sort.of_GetExclude(ls_excludecols)
// Add All of the columns and Select the Excluded columns
li_upperall = UpperBound(ls_allcols)
li_upperexc = UpperBound(ls_excludecols)
For li_cntall = 1 to li_upperall
li_index = lb_excludecols.AddItem(ls_allcols[li_cntall])
// Determine if this is an exclude column.
For li_cntexc = 1 to li_upperexc
If ls_allcols[li_cntall] = ls_excludecols[li_cntexc] Then
lb_excludecols.SetState ( li_index, True )
Exit
End If
Next
Next
Return 1
end event