|
pfc_controlgotfocus
|
|
Full name
|
pfc_w_sheet.pfc_controlgotfocus
|
Access
|
public
|
Extend of
|
|
Return value
|
|
Prototype
|
event pfc_controlgotfocus()
|
Name
|
Datatype
|
ldw_control
|
datawindow
|
lnv_string
|
n_cst_string
|
ls_colname
|
string
|
ls_columntag
|
string
|
ls_microhelp
|
string
|
event pfc_controlgotfocus;call w_master::pfc_controlgotfocus;//////////////////////////////////////////////////////////////////////////////
//
// Event: pfc_controlgotfocus
//
// Arguments:
// adrg_control Control which just got focus
//
// Returns: none
//
// Description:
// Display the microhelp stored in the tag value of the current control
//
// Note: The format is MICROHELP=
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.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.
//
//////////////////////////////////////////////////////////////////////////////
string ls_columntag
string ls_microhelp
string ls_colname
datawindow ldw_control
n_cst_string lnv_string
// Request microhelp
if gnv_app.of_GetMicrohelp() then
// If control with focus is a datawindow, use current column's microhelp
if adrg_control.TypeOf() = DataWindow! then
ldw_control = adrg_control
ls_colname = ldw_control.GetColumnName()
if Len (ls_colname) > 0 then
// Check the column tag for any microhelp information.
ls_columntag = ldw_control.Describe (ls_colname + ".tag")
ls_microhelp = lnv_string.of_GetKeyValue (ls_columntag, "microhelp", ";")
end if
else
// Check the control tag for any microhelp information.
ls_microhelp = lnv_string.of_GetKeyValue (adrg_control.tag, "microhelp", ";")
end if
// If the microhelp variable is empty make sure it displays "Ready".
if lnv_string.of_IsEmpty (ls_microhelp) then
ls_microhelp = ''
end If
// display microhelp
this.event pfc_microHelp (ls_microhelp)
end if
end event