[Pas2js] Pas2js Digest, Vol 55, Issue 8

Mgr. Janusz Chmiel janusz.chmiel at volny.cz
Sat Feb 25 15:14:11 CET 2023


Dear Steve,
	Thank you for your professional advices.
Pas2jswidgets allow Me to work as follows.
I create The project.
I use CTRL+ALT+p shortcut to recall components window.
I type tw letters on The search components Editbox to filter only Pas2jswidgets GUI specific elements such as Twbutton, twEdit, ETc.
I must use NVDA special rewiev mode which calls GDI32 functions and special GDI hooks in C so textual output of Lazarus components list is readable and I can click on those elements. Because components list is not being coded by using Tlistwiev class for example which would be fully NVDA accessible.
I press Insert and Divide on numeric keypad to assign chosen component and I press Enter key.
In this case, I can change Button text by pressing F2. I can even use Lazarus Context menu to recallGUI specific context  menu. So I can create default event for chosen object.
For Button, default event is Click, for Edit field The default event is Onchange, ETC.
In this case, focus automatically jump to Lazarus source code Window. And cursor is located one line after Begin keyword in The procedure buttonclick event.
If I would use Combobox, or Listbox, I can even add multiple items by only typing them in The form Windows after pressing F2.
So text value I write line by line followed by pressing Enter. And Listbox will contain several items. I can save textual changes by pressing Ok button.

Lazarus form Window fortunately support focus navigation. So TAB and SHIFT+Taband arrow keys work.
I can know on which item I Am by pressing F2.

My painful reality is related to object positioning on Pas2js widgets.
Lamw, Lamw android module wizard support special more keywords in The .lfm files than when using LCL or Pas2js.
It is possible to use adjectives as follows to specify object typographical information.
Button1.Text:= 'App Runtime Layouting Demo';
Button1.LayoutParamWidth:= lpWrapContent;
Button1.LayoutParamHeight:= lpWrapContent;
Button1.PosRelativeToParent:= [rpTop, rpCenterHorizontal];
Button1.UpdateLayout();
Unfortunately, such object members are not known by Pas2js units or by Pas2jswidgets or even by LCL.

But I will not be sad any more.

I will code buttons and other GUI element and I will please my mother for help.
If there are not sliders and developer must really use Object inspector and Editable fields to specify object position values, it will not be very pleasant work.
I will try to test it with my mother what she will see on The screen.


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


More information about the Pas2js mailing list