Example--ActiveX Controls
The following code is an example of how an ActiveX control can be coded in OpenROAD. It displays a web page in an OpenROAD frame. It assumes that the frame contains the following fields:
browser
Specifies an OpenROAD external object (an ActiveX control inserted into the frame)
urlfield
Specifies an OpenROAD entry field
forward
Specifies an OpenROAD button field
back
Specifies an OpenROAD button field
initialize()=
declare
enddeclare
begin
curframe.flush();
urlfld = 'http://www.actian.com';
browser.navigate(urlfld);
end
on click forward =
begin
browser.goforward();
end
on click back =
begin
browser.goback();
end
on setvalue urlfld =
begin
browser.navigate(urlfld);
end;
on extclassevent 'statustextchange'
(text = varchar(256) not null)=
begin
curframe.statustext = text;
end;
on extclassevent 'beforenavigate'
(url = varchar(256) not null) =
begin
urlfld = url;
end;
Last modified date: 06/25/2024