Navigation:  Reference > Functions >

GetObjPropertyValue()

Print this Topic Previous pageReturn to chapter overviewNext page

 

GET_OBJ_PROP(1,2,3)

 

PURPOSE

All objects on a form (visual or non-visual) have properties.  These can be accessed using this function.  For more information about properties please refer to Form Object - General Info.

PARTS

1 f/c/eRequired - The object name.  This would be the value in the Name field that is a part of each object.

 

2 f/c/eRequired - The property name, e.g., 'Top', 'Left', 'Visible', etc..

 

3 f/c/eThis function will automatically use the active form in the current program.  However, you may want to access an object on a different form.  If so, use the FORM_PTR() value here.

 

RETURN TYPE - Variable

The return type depends entirely on the property.  The possibilities are: A - Alpha or string value, B/I/R - Integer value, or L - Logical (boolean).

 

COMMENTS

If the function can't find the object or property then it will return the string: 'No Value Returned'.

 

EXAMPLE

 

 

define a type a size 50

a = get_obj_prop('btnTest','Caption')

// a = 'This is a Test'

// using the button above and

// assuming the name is btnTest

 

(* NOTE:  You can get subproperty values

  using this function also.  So, for

  example, if you wanted to get the

  font size for the above object

  you would use:  *)

 

define x type n size 5

x = get_obj_prop('btnTest','Font.Size')

 

(* Notice that you put the subproperty

  as part of the property field with a

  period (.) between the property name

  and the subproperty name.  There

  are not very many properties with

  subproperties.  The Font property is

  the most commonly used of that type. *)

 

SEE ALSO

SET_OBJ_PROP(), SET_ALL_OBJECTS, EQUAL (=), Tips

 

 


Page url: http://www.cassoftware.com/tas/manual/getobjpropertyvalue().htm