[Pas2js] is it possible to create GUi with no need to manually add the code to .html page

Mgr. Janusz Chmiel janusz.chmiel at volny.cz
Tue Aug 25 13:46:55 CEST 2020


Dear MR SUZINEAU,
You have given Me perfect advice. Code can be compiled with no issues. But
my screen reader even its build in OCR function from screen do not see
The text of The button.
Please would you try, if this code produces button which you can see on The
screen?
Or really, button is not presented?
 
program project1;
 
{$mode objfpc}
 
uses
  browserapp, JS, Classes, SysUtils, Web, webwidget, htmlwidgets;
 
type
  TMyApplication = class(TBrowserApplication)
 
    procedure doRun; override;
       public
     FMyPage: TWebPage;
     FMyButton: TButtonWidget;
   end;
 
 
 
procedure TMyApplication.doRun;
 
begin
  FMyPage:=TWebPage.Create(Self);
FMyButton:=TButtonWidget.Create(Self);
FMyButton.Parent:=FMyPage;
FMyButton.Text:='Start The code';
 

  Terminate;
end;
 
var
  Application : TMyApplication;
 
begin
  Application:=TMyApplication.Create(nil);
  Application.Initialize;
  Application.Run;
  Application.Free;
end.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20200825/e21cdcea/attachment.htm>


More information about the Pas2js mailing list