|
pfc_propertysyntax
|
|
Full name
|
pfc_u_tabpg_dwproperty_srvsort.pfc_propertysyntax
|
Access
|
public
|
Extend of
|
|
Return value
|
|
Prototype
|
event pfc_propertysyntax()
|
Name
|
Datatype
|
lb_desired
|
boolean
|
li_cnt
|
integer
|
li_excludecount
|
integer
|
li_index
|
integer
|
li_rc
|
integer
|
li_styledesired
|
integer
|
li_upper
|
integer
|
lnv_conversion
|
n_cst_conversion
|
ls_exclude
|
string
|
ls_excludecols
|
string[]
|
ls_syntax
|
string
|
event pfc_propertysyntax;call super::pfc_propertysyntax;//////////////////////////////////////////////////////////////////////////////
//
// Function: pfc_propertysyntax
//
// Access: Public
//
// Arguments: None
//
// Returns: String
// The syntax required to create the currently selections.
// '!' in error
//
// Description:
// Create the required syntax to match the current selections.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_upper
integer li_cnt
integer li_rc
integer li_styledesired
integer li_index
integer li_excludecount=0
string ls_excludecols[]
string ls_exclude
string ls_syntax
boolean lb_desired
n_cst_conversion lnv_conversion
// Validate references.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
Return '!'
End If
If IsNull(idw_requestor.inv_sort) or Not IsValid(idw_requestor.inv_sort) Then
Return '!'
End If
// -- Start the service. --
ls_syntax += 'This.of_SetSort(True)~r~n'
// -- Style. --
li_styledesired = ii_style - 1
Choose Case li_styledesired
Case idw_requestor.inv_sort.DEFAULT
ls_syntax += '~r~nThis.inv_sort.of_SetStyle(inv_sort.DEFAULT)'
Case idw_requestor.inv_sort.DRAGDROP
ls_syntax += '~r~nThis.inv_sort.of_SetStyle(inv_sort.DRAGDROP)'
Case idw_requestor.inv_sort.SIMPLE
ls_syntax += '~r~nThis.inv_sort.of_SetStyle(inv_sort.SIMPLE)'
Case idw_requestor.inv_sort.DROPDOWNLISTBOX
ls_syntax += '~r~nThis.inv_sort.of_SetStyle(inv_sort.DROPDOWNLISTBOX)'
Case Else
ls_syntax += '~r~nThis.inv_sort.of_SetStyle('+String(li_styledesired)+')'
End Choose
// -- Column header. --
lb_desired = cbx_columnheader.Checked
ls_syntax += '~r~nThis.inv_sort.of_SetColumnHeader('+lnv_conversion.of_String(lb_desired)+')'
// -- Header suffix. --
If Len(Trim(sle_headersuffix.Text)) > 0 Then
ls_syntax += '~r~nThis.inv_sort.of_SetDefaultHeaderSuffix("'+sle_headersuffix.Text+'")'
End If
// -- Visible Only. --
lb_desired = cbx_visibleonly.Checked
ls_syntax += '~r~nThis.inv_sort.of_SetVisibleOnly('+lnv_conversion.of_String(lb_desired)+')'
// -- Display Values. --
lb_desired = cbx_usedisplayvalue.Checked
ls_syntax += '~r~nThis.inv_sort.of_SetUseDisplay('+lnv_conversion.of_String(lb_desired)+')'
// -- Exclude Columns. --
// Get the number of items in the ListBox.
li_upper = lb_excludecols.TotalItems( )
For li_cnt = 1 to li_upper
// Is the item selected?
If lb_excludecols.State(li_cnt) = 1 THEN
li_excludecount ++
ls_exclude += '~r~nls_exclude['+string(li_excludecount)+'] = "'+ &
lb_excludecols.text(li_cnt)+'"'
End If
Next
If li_excludecount > 0 Then
// -- Defined required variables. --
ls_syntax = 'String ls_exclude[]~r~n~r~n' + ls_syntax
ls_syntax += ls_exclude
ls_syntax += '~r~nThis.inv_sort.of_SetExclude(ls_exclude)'
End If
Return ls_syntax
end event
Name
|
Owner
|
listbox.state |
listbox
|
listbox.text |
listbox
|
listbox.totalitems |
listbox
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.len |
systemfunctions
|
systemfunctions.string |
systemfunctions
|
systemfunctions.trim |
systemfunctions
|
pfc_n_cst_conversion.of_string |
pfc_n_cst_conversion
|
pfc_u_tabpg_dwproperty_base.pfc_propertysyntax |
pfc_u_tabpg_dwproperty_base
|