When you refer to property values and event names you must always qualify them by the name of the component they belong to.
You can assign the value of a property to another component. For instance this statement assigns the value of the Level property of the current item in a tree view to a field called #level.
Change #LEVEL #Trvw_1.CurrentItem.Level
Often in your code you want to test the value of a property. You do this using the IF statement where the condition is specified using the property name qualified by the name of the component, a standard operator and the value of the property:
IF COND('#rdbn_3.ButtonChecked *eq True')
Set Com(#SPOUSE #MARRIED #DIVORCED) Enabled(true)
IF COND('#lvcl_1.SortDirection *eq Ascending')
Set Com(#lvcl_1) SortDirection(Descending)