Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: 1 [2]
  Reply  |  Print  
Author Topic: ui.Interaface.loadToolBar()  (Read 28314 times)
Huy H.
Posts: 45


« Reply #15 on: January 10, 2019, 06:00:48 pm »

No problem Judy :-) That's normally how forum threads goes.  At this risk of steering this conversation in another direction, we ran into this screenshot (attached) on the "IBM I4GL to Genero" information page https://4js.com/support/ibm-i4gl-to-genero/

Can we actually do that?  It would be nice if we could.


* DnDwithRibbon.png (48.48 KB, 1010x369 - viewed 2946 times.)
Judy S.
Posts: 18


« Reply #16 on: January 10, 2019, 06:22:14 pm »

Just to follow-up with the multi-dialog, I attached 2 screen shots from this application, showing how the Window is rendered when switching between 2 different inputs within the same multi-dialog.

Note how the Action Panel changes according to the actions that are defined within the current-active-dialog.

In this application, the toolbar stays consistent between all the dialogs, only showing the actions that are common among the various inputs within the multi-dialog, and we like it that way.

However, I would assume that if the loaded toolbar file does define additional actions that are included within the current input, then the toolbar should be re-rendered the same way that the front-end re-renders the Action Panel when switching between the specific input dialog; i.e. hiding and un-hiding the actions according the existence or non-existence of the actions within the current active input.

* Multi_dialog_toolbar.zip (64.46 KB - downloaded 1556 times.)
* Multi_dialog_toolbar2.zip (67.65 KB - downloaded 1528 times.)
Reuben B.
Four Js
Posts: 1119


« Reply #17 on: January 10, 2019, 09:42:10 pm »

No problem Judy :-) That's normally how forum threads goes.  At this risk of steering this conversation in another direction, we ran into this screenshot (attached) on the "IBM I4GL to Genero" information page https://4js.com/support/ibm-i4gl-to-genero/

Can we actually do that?  It would be nice if we could.


That screenshot is going back a few years.  The DUA_SL in the URL indicates that it was using the Silverlight snippet set and so is probably around version 2.40.

I believe it is a customization of the TopMenu to render as a Ribbon like Toolbar.  Why TopMenu, because it has the Group concept (TopMenuGroup) that you can group elements together with and it has a text attribute you can utilise for the File, Navigate, Edit, Help text you see. 

Using the Genero Browser Client (GBC), you could do a similar customization of the TopMenu, TopMenuGroup, TopMenuCommand to achieve a similar result.

Reuben


Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Leo S.
Four Js
Posts: 129


« Reply #18 on: January 11, 2019, 01:29:06 am »

Just to follow-up with the multi-dialog, I attached 2 screen shots from this application, showing how the Window is rendered when switching between 2 different inputs within the same multi-dialog.

Note how the Action Panel changes according to the actions that are defined within the current-active-dialog.

In this application, the toolbar stays consistent between all the dialogs, only showing the actions that are common among the various inputs within the multi-dialog, and we like it that way.

However, I would assume that if the loaded toolbar file does define additional actions that are included within the current input, then the toolbar should be re-rendered the same way that the front-end re-renders the Action Panel when switching between the specific input dialog; i.e. hiding and un-hiding the actions according the existence or non-existence of the actions within the current active input.

Hi Judy , understood. The request is clear now also for multiple dialogs.
I registered FGL-5036 "Add a new attribute for ToolBarItem to indicate it should be hidden if it's not in the current dialog (sub dialog)".
So applying that to all items it turns the toolbar into a kind of action panel follower with the difference that no actions are actively added. Actions are only removed or re shown.
I can't make any promises when this can be added , but its a hot candidate for vnext.
Regards, Leo
Judy S.
Posts: 18


« Reply #19 on: January 11, 2019, 04:28:35 pm »

Thank you very much, Leo!
We are looking forward to this enhancement, as it will instantly make our applications look much more professional and polished by not having clutter on the toolbar, while eliminating the need to hand-code a workaround solution like we have been doing.
Leo S.
Four Js
Posts: 129


« Reply #20 on: November 11, 2021, 02:05:35 pm »

Hello everyone, to come back to this topic:
The ability to hide inactive items in ToolBar and TopMenu has been finally implemented in Genero 4.00 ,
see https://4js.com/online_documentation/fjs-fgl-manual-html/?path=fjs-fgl-manual#fgl-topics/c_fgl_FSFAttributes_AUTOHIDE.html
and is a .per level  attribute for ToolBarItem(s) and TopMenuCommand(s).

Furthermore an AUTOITEMS placeholder attribute for the (remaining) action panel actions have been added in ToolBar in case you don't use the action panel.
https://4js.com/online_documentation/fjs-fgl-manual-html/?path=fjs-fgl-manual#fgl-topics/c_fgl_FormSpecFiles_TOOLBAR_section.html
and also in TopMenu as AUTOCOMMANDS place holder , see
https://4js.com/online_documentation/fjs-fgl-manual-html/?path=fjs-fgl-manual#fgl-topics/c_fgl_FormSpecFiles_TOPMENU_section.html

I recommend everybody planning the upgrade to 4.00 to check if the usage of those attributes can be a substantial way to remove boilerplate in your programs.
Regards, Leo
Judy S.
Posts: 18


« Reply #21 on: November 11, 2021, 03:53:36 pm »

Hi Leo,

Thank you for adding these features.
Can you please explain what "boilerplate" means, when you wrote: "... remove boilerplate in your programs".

Thank you.
Leo S.
Four Js
Posts: 129


« Reply #22 on: November 11, 2021, 05:00:42 pm »

Hi Judy,
with 'removing boilerplate' I refer to all locations in your code which do manipulate the toolbar in order to get the wanted 'clean' toolbar appearance on each enter/leave of the dialog...
The credits for these features need to be forwarded to Rene btw.
Regards, Leo
Judy S.
Posts: 18


« Reply #23 on: November 11, 2021, 05:26:14 pm »

Thank you for explaining, Leo!
Thank you Rene, for your efforts on this feature!
Pages: 1 [2]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines