OCX Events, Properties and Methods
Here is more information on u_ter events, properties and meth9ods. Open the u_ter object in PowerBuilder. Right click on the u_ter user object and select Script. Click on the event dropdown and you will see a combined list of PowerBuilder events, u_ter OCX events and any user defined events. The PowerBuilder events do not have any function for an OCX because the OCX events take precedence. You should become familiar with the names of the TER OCX events. When you view the list of user events in the user object painter prior to adding any user events, the PowerBuilder events are grayed out and the TER OCX events are white. In addition, user defined events can be added to the u_ter object in the user object painter. If you use the naming convention of ue_eventname to name your events, you will always know which of the events are user added from within PowerBuilder. Remember that user events that are added from within PowerBuilder must be triggered by your PowerBuilder code. They are not connected to the TER OCX.
You can use the PowerBuilder object browser to see a list of the TER properties that are exposed by the TER OCX and you can find the property definitions in this manual. Use either of the following syntax to get or set an OCX property value. You must make sure that you use the correct type variable in the following since the PowerBuilder compiler does not do type checking. Also, the PowerBuilder compiler does not check that the property name used is valid. The compiler ignores everything after the ".object." part of the syntax.
To set a property value, use: (for example)
u_ter.object.PageMode = True
To get a property value, use: (for example)
lb_pagemode = t_ter.object.PageMode
If you are going to use the command property to issue menu commands, you need to define instance variables in your u_ter user object. The command values are found in the source code .h files.
OCX functions are accessed in much the same way as OCX properties. You need to know the function arguments and the type of the return value.
To get the about box, use the following syntax:
u_ter.object.AboutBox()