Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : ActiveX Control Support : Programming ActiveX controls in the AppBuilder : Interacting outside of event procedures
 
Interacting outside of event procedures
Finally, this is a simple example of where you might reference an ActiveX control from a procedure other than an event procedure:
/* ********************** Internal Procedures *********************** */
. . .

PROCEDURE displayCustomer :
/*------------------------------------------------------------------------
Purpose:
Parameters: <none>
Notes:
------------------------------------------------------------------------*/

  iRecordCount = chCSSpin:Value.
  DISPLAY sports2000.Customer.Name sports2000.Customer.Address
    sports2000.Customer.Address2 sports2000.Customer.Balance
    sports2000.Customer.City sports2000.Customer.Comments
    sports2000.Customer.Contact sports2000.Customer.Country
    sports2000.Customer.CreditLimit sports2000.Customer.CustNum
    sports2000.Customer.Discount sports2000.Customer.PostalCode
    sports2000.Customer.SalesRep sports2000.Customer.Terms
    sports2000.Customer.State sports2000.Customer.Phone
    iRecordCount
WITH FRAME Dialog-Frame.
END PROCEDURE.
The displayCustomer procedure retrieves a changed setting of the CSSpin Value property and displays it as the current record position for any event that changes that position. Other interactions are possible within triggers for control-frame events and by passing the control handle to external and persistent procedures.