|
of_gettype
|
|
Full name
|
pfc_n_cst_security.of_gettype
|
Access
|
public
|
Extend of
|
string
|
Return value
|
string
|
Prototype
|
public function string of_gettype(windowobject,ref string)
|
Name
|
Datatype
|
l_cb
|
commandbutton
|
l_cbx
|
checkbox
|
l_ddlb
|
dropdownlistbox
|
l_ddplb
|
dropdownpicturelistbox
|
l_dw
|
datawindow
|
l_em
|
editmask
|
l_gb
|
groupbox
|
l_graph
|
graph
|
l_mle
|
multilineedit
|
l_ocx
|
olecustomcontrol
|
l_ole
|
olecontrol
|
l_pb
|
picturebutton
|
l_pic
|
picture
|
l_rb
|
radiobutton
|
l_sle
|
singlelineedit
|
l_st
|
statictext
|
l_uo
|
userobject
|
public function string of_gettype (windowobject a_object, ref string as_desc);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_GetType
//
// Access: public
//
// Arguments:
// a_object : windowobject ; Object that we want to determine the type of
//
// Returns: String
// Name of the object type
//
// Description: Provide ASCII format of typeof() function return
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
// 6.0 Marked obsolete
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
choose case typeof(a_object)
case commandbutton!
commandbutton l_cb
l_cb = a_object
as_desc = l_cb.text
if as_desc = '' then as_desc = of_GetTag(l_cb.tag)
return 'CommandButton'
case checkbox!
checkbox l_cbx
l_cbx = a_object
as_desc = l_cbx.text
if as_desc = '' then as_desc = of_GetTag(l_cbx.tag)
return 'CheckBox'
case radiobutton!
radiobutton l_rb
l_rb = a_object
as_desc = l_rb.text
if as_desc = '' then as_desc = of_GetTag(l_rb.tag)
return 'RadioButton'
case datawindow!
datawindow l_dw
l_dw = a_object
as_desc = l_dw.title
if as_desc = '' then as_desc = of_GetTag(l_dw.tag)
return 'DataWindow'
case userobject!
userobject l_uo
l_uo = a_object
as_desc = l_uo.text
if as_desc = '' then as_desc = of_GetTag(l_uo.tag)
return 'UserObject'
case tab!
as_desc = of_GetTag(a_object.tag)
return 'Tab'
case listbox!
as_desc = of_GetTag(a_object.tag)
return 'ListBox'
case dropdownlistbox!
dropdownlistbox l_ddlb
l_ddlb = a_object
as_desc = l_ddlb.text
if as_desc = '' then as_desc = of_GetTag(l_ddlb.tag)
return 'DropDownListBox'
case dropdownpicturelistbox!
dropdownpicturelistbox l_ddplb
l_ddplb = a_object
as_desc = l_ddplb.text
if as_desc = '' then as_desc = of_GetTag(l_ddplb.tag)
return 'DropDownPictureListBox'
case singlelineedit!
singlelineedit l_sle
l_sle = a_object
as_desc = l_sle.text
if as_desc = '' then as_desc = of_GetTag(l_sle.tag)
return 'SingleLineEdit'
case multilineedit!
multilineedit l_mle
l_mle = a_object
as_desc = l_mle.text
if as_desc = '' then as_desc = of_GetTag(l_mle.tag)
return 'MultiLineEdit'
case editmask!
editmask l_em
l_em = a_object
as_desc = l_em.text
if as_desc = '' then as_desc = of_GetTag(l_em.tag)
return 'EditMask'
case picturelistbox!
as_desc = of_GetTag(a_object.tag)
return 'PictureListBox'
case richtextedit!
as_desc = of_GetTag(a_object.tag)
return 'RichTextEdit'
case statictext!
statictext l_st
l_st = a_object
as_desc = l_st.text
if as_desc = '' then as_desc = of_GetTag(l_st.tag)
return 'StaticText'
case groupbox!
groupbox l_gb
l_gb = a_object
as_desc = l_gb.text
if as_desc = '' then as_desc = of_GetTag(l_gb.tag)
return 'GroupBox'
case treeview!
as_desc = of_GetTag(a_object.tag)
return 'TreeView'
case listview!
as_desc = of_GetTag(a_object.tag)
return 'ListView'
case olecontrol!
as_desc = of_GetTag(a_object.tag)
if as_desc = '' then
olecontrol l_ole
l_ole = a_object
// as_desc = l_ole.classshortname
end if
return 'OLE Control'
case olecustomcontrol!
as_desc = of_GetTag(a_object.tag)
if as_desc = '' then
olecustomcontrol l_ocx
l_ocx = a_object
// as_desc = l_ocx.classshortname
end if
return 'OCX'
case picturebutton!
picturebutton l_pb
l_pb = a_object
as_desc = l_pb.text
if as_desc = '' then as_desc = of_GetTag(l_pb.tag)
return 'PictureButton'
case graph!
graph l_graph
l_graph = a_object
as_desc = l_graph.title
if as_desc = '' then as_desc = of_GetTag(l_graph.tag)
return 'Graph'
case vscrollbar!
as_desc = of_GetTag(a_object.tag)
return 'VScrollBar'
case hscrollbar!
as_desc = of_GetTag(a_object.tag)
return 'HScrollBar'
case picture!
picture l_pic
l_pic = a_object
as_desc = l_pic.picturename
if as_desc = '' then as_desc = of_GetTag(l_pic.tag)
return 'Picture'
case line!
as_desc = of_GetTag(a_object.tag)
return 'Line'
case rectangle!
as_desc = of_GetTag(a_object.tag)
return 'Rectangle'
case oval!
as_desc = of_GetTag(a_object.tag)
return 'Oval'
case Roundrectangle!
as_desc = of_GetTag(a_object.tag)
return 'RoundRectangle'
case else
as_desc = 'Unknown : '+classname(a_object)
return 'Unknown'
end choose
end function