Results 1 to 9 of 9

Thread: Menu and submenu

  1. #1

    Menu and submenu

    Dear all,
    I would like to know if someone can assist on how to create submenu (level2 and 3) in a form.
    I can only create a 1level menu using the option "custom menu" of the form. For example Fichiers(Juridiction|Confrere|Client|Affaire|Dossi er|Honoraire|Documents|Audience).
    What is I want to add 2 submenus for menu item like Client in this example?


    Regards,

    Esperant

  2. #2
    Senior Member
    Join Date
    Jul 2013
    Location
    Ontario, Canada
    Posts
    658
    Hi Esperant,

    Lianja menus are fairly simplistic.
    You can only have 1 level submenu and as soon as a submenu is added, if you have keyboard shortcuts (ex. &Help), they will not work.

    Menu item are separated by a comma.
    Submenus are created in parentheses.

    Here is an example with 2 menu items and one sub level.

    Configurations,Help(About)

    As far as I'm aware, Lianja does not support any further submenus.

    Cory
    Last edited by CGibson; 2016-02-18 at 13:35.

  3. #3
    Hi,

    Lianja is very flexible in that you can approach issues from different directions.
    If you have the need to create menus with many nested layers, you may want to look at adding a webview section on top of your form section and use bootstrap or jquery for the menu.

    I did a demo that sort of covered this some time back.


    https://www.youtube.com/watch?v=DlEHGGe00VA

    https://www.youtube.com/watch?v=PGmVEP_YwrI

    In this case I was using a third party product to copy and past the code, but you can easily find examples on the web.

    Additionally, you can try the Jquery UI menu.

    https://jqueryui.com/menu/

    Check out the example_jquery app that comes with Lianja.

    Herb

    Note - Last I looked, pinegrow was using bootstrap 3.3.4,so just be aware in case you want to go that route.

  4. #4
    Esperant,

    I will put together a full working example later today.
    Something that you can just plug in and modify.

    Herb

  5. #5
    Hmmm....

    Actually - that looks like it may not work since I cant overflow the dropdown into the form section.

    This is an interesting challenge. I am going to try some other approachesName:  bstrapMenu.jpg
Views: 466
Size:  31.9 KB.

    Herb

  6. #6
    Here is an idea.

    It's funky, but works

    1 - create a Jquery menu (just copy it from the Jquery page)
    2 - Save it as an RSP page.
    3 - Set it as your custom menu panel.

    Since at this time, I cant get it to overflow the form items, I set the height of the panel to 250 and set visble to false.

    Then I set the custom search Icon to visible on the section.
    In the custom search command delegate, I use the following code.
    proc page1_section1_customsearch()
    if Lianja.get("page1.section1").menuvisible = .t.
    Lianja.get("page1.section1").menuvisible =.f.
    else
    Lianja.get("page1.section1").menuvisible = .t.
    end

    endproc

    So this will allow you to use Jquery menu to nest as many options as you like in section menu. Not the greatest solution, I know, but it will work.

    I still want to try some ideas when I have the time.

    I'm also sure Barry can think of ten better ways to do this, but I thought this was a interesting question.

    Name:  JqMenu1.jpg
Views: 484
Size:  26.8 KBName:  JqMenu2.jpg
Views: 889
Size:  30.1 KB
    Herb

  7. #7
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    I need to look into our code and see why menus are limited to 2 level. If you are building a desktop app you may be able to put a custom section above the form section and create a multi level menu programmatically using the core VFP UI classes.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  8. #8
    Hi Barry,

    I have done than in the past and it works fine if you don't nest them too deep.
    You and I went back and forth on that on a thread called popupmenu.

    Which got me thinking about two other approaches.
    1. An actual VFP style popupmenu.
    2. a borderless dialog box where you can just have the menu as an RSP page..

    Like so. But without the border.Name:  JqMenuDLG.jpg
Views: 511
Size:  21.6 KB

    Just my 2 pennies.

    Herb

  9. #9
    Thank you guys for your advices about how to create submenus.
    But tfrom my point of view, I think menu is an important Ui component which must be easy to create in a RAID tool like Lianja.
    So, I hope to see in future improvments an easiest way to built a menu in a wysiwyg way.

    Regards,

    Esperant

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us