|
of_restorefocuspoint
|
|
Full name
|
pfc_n_cst_winsrv_statusbar.of_restorefocuspoint
|
Access
|
protected
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
protected function integer of_restorefocuspoint(graphicobject)
|
Name
|
Datatype
|
ldrg_obj
|
dragobject
|
li_rc
|
integer
|
lw_obj
|
window
|
protected function integer of_restorefocuspoint (graphicobject ago_focus);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_RestoreFocusPoint
//
// Access: protected
//
// Arguments:
// ago_focus object which should get focus.
//
// Returns: Integer
// 1 if it succeeds and -1 if an error occurs.
//
// Description:
// Restore the focus point to the passed in object. If an invalid object is
// passed in, then the focus point is passed in to the iw_requestor.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0.03 Initial version
// 7.0 Added new controls hprogressbar!, htrackbar!, vprogressbar!,
// vtrackbar!, picturehyperlink!, statichyperlink!
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
integer li_rc
window lw_obj
dragobject ldrg_obj
If IsValid(ago_focus) Then
// Attempt to set focus on the passed-in object.
CHOOSE CASE ago_focus.TypeOf()
CASE Window!
lw_obj = ago_focus
li_rc = lw_obj.SetFocus()
CASE checkbox!, commandbutton!, datawindow!, dropdownlistbox!, dropdownpicturelistbox!, &
editmask!, graph!, groupbox!, hprogressbar!, hscrollbar!, htrackbar!, listbox!, &
listview!, multilineedit!, olecontrol!, olecustomcontrol!, omcontrol!, omcustomcontrol!, &
omembeddedcontrol!, picture!, picturebutton!, picturehyperlink!, picturelistbox!, &
radiobutton!, richtextedit!, singlelineedit!, statichyperlink!, statictext!, &
tab!, treeview!, userobject!, vprogressbar!, vscrollbar!, vtrackbar!
ldrg_obj = ago_focus
li_rc = ldrg_obj.SetFocus()
CASE else
// Not a valid object, set focus on the requestor.
If IsValid(iw_requestor) Then
li_rc = iw_requestor.SetFocus()
Else
li_rc = -1
End If
END CHOOSE
Else
// By default, set focus on the parent frame.
If IsValid(iw_requestor) Then
li_rc = iw_requestor.SetFocus()
Else
li_rc = -1
End If
End If
Return li_rc
end function
Name
|
Owner
|
powerobject.typeof |
powerobject
|
window.setfocus |
window
|
dragobject.setfocus |
dragobject
|
systemfunctions.isvalid |
systemfunctions
|