Subscribe for automatic updates: RSS icon RSS

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

Pages: [1]
  Reply  |  Print  
Author Topic: Ask Reuben 31 - Consider using TREE instead of StartMenu  (Read 2654 times)
Reuben B.
Four Js
Posts: 934


« on: May 27, 2020, 09:34:16 am »

When answering a question that involves StartMenu, I tend to find that my first response is “Have you considered replacing StartMenu with equivalent functionality using a TREE container?” 

The reason I favour TREE over StartMenu is that it allows you to combine your TREE with the rest of what is in the Genero developer toolbox.  The StartMenu is very simple but with that simplicity comes restrictions.  The TREE and its underlying DISPLAY ARRAY can be combined with other dialogs in a multiple-dialog solution,  and you get access to the built-in functionality of the TREE container allowing you to respond in more ways to the actions of the user.

Read more at https://4js.com/ask-reuben/ig-31/

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Candy M.
Posts: 139


« Reply #1 on: May 27, 2020, 03:45:21 pm »

Thank you Reuben.    We had just asked Support in the last couple of weeks if there was a way to have a webcomponent or fglsvgcanvas with a StartMenu.

So I have 2 questions for this TREE method.

1)  We like how the side panel of the StartMenu can disappear.   In fact, we have the side panel hidden as the default now.   The user must press the Hamburger icon to see it.   So is there any way to have the Tree dialog disappear like the side bar?

2)   We also like the tabbedContainer attribute for the window, so each application shows as a folder tab.  Is there anyway to get that behavior with using the TREE?

Thank you and hope you are doing well!

Candy
Reuben B.
Four Js
Posts: 934


« Reply #2 on: May 28, 2020, 02:16:50 am »

Candy,

Can you clarify what options / style settings you are using as your question is a little confusing
GDC v GBC
SDI v MDI
what is in your .4st

You refer to "side panel of the Startmenu".  The SidePanel refers to an Application in a GBC
http://4js.com/online_documentation/fjs-gbc-manual-html/fundamentals/tour/tour_app_page.html
it doesn't belong to StartMenu

The point I was trying to make is that by using a Tree container /  DISPLAY ARRAY, you can do whatever Genero allows as it is regular 4gl code, and not something special like the StartMenu implementation.  So your question, can you make a TREE container disappear, so if you have
HBOX (SPLITTER)
TREE t1
...
END # TREE
GROUP g1
...
END # GROUP
END #HBOX

then you can use ui.Form.setElementHidden http://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_ClassForm_setElementHidden.html to show/hide it

or SPLITTER http://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_FSFAttributes_SPLITTER.html to allow the container to be resized or not



Reuben






Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Candy M.
Posts: 139


« Reply #3 on: May 28, 2020, 02:47:11 am »

Reuben,
    This is for the GBC.
    The Window that is opened with the StartMenu has these style settings
Code
  1. <Style name="Window.mtmain_tree_gbc">
  2.     <StyleAttribute name="windowType" value="normal" />
  3.     <StyleAttribute name="ignoreMinimizeSetting" value="yes" />
  4.     <StyleAttribute name="startMenuPosition" value="tree" />
  5.     <StyleAttribute name="startMenuSize" value="large" />
  6.     <StyleAttribute name="actionPanelPosition" value="none" />
  7.     <StyleAttribute name="ringMenuPosition" value="none" />
  8.     <StyleAttribute name="toolBarPosition" value="none" />
  9.     <StyleAttribute name="errorMessagePosition" value="popup" />
  10.     <StyleAttribute name="tabbedContainer" value="yes" />
  11.  </Style>
  12.  

So we have our our own background image for the empty tabbed container here:  https://4js.com/online_documentation/fjs-gbc-manual-html/howdoi/customize-file-replace/change-mttab-bkgd-img.html

We would like to have a dashboard where the empty tabbed container image is located and the solution you posted here gives us a good idea on how we can accomplish that.

I think our app is an SDI, as we don't use MDI.

But we like the side panel disappearing in the GBC and the tabbed container for each of the apps launched.

We really do like your idea of using the TREE, but we want the launcher part (the tree) to disappear and have programs appear in a tabbed container.   Maybe we
can't do that and have dashboard, too.

Candy
Reuben B.
Four Js
Posts: 934


« Reply #4 on: May 29, 2020, 07:04:06 am »

Candy,

With what you have already using tabbedContainer=yes, to have a dashboard you could simply have your parent program launch your dashboard program using RUN WITHOUT WAITING after the OPEN WINDOW.

To quickly see what I mean, try adding (replacing $FGLDIR if necessary)

RUN "fglrun $FGLDIR/demo/webcomponents/svgbasics/svgbasics.42m" WITHOUT WAITING

after the OPEN WINDOW of your StartMenu parent program. 


As an interesting aside I look at the tabbedContainer and think why do we have something special for it, is it not a sidebar with applications items stacked horizontally instead of vertically, and the window items hidden ...

Reuben




 

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines