Results 1 to 2 of 2

Thread: [Answers] Menu

Threaded View

  1. #1
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135

    [Answers] Menu

    The 'Context menu' attribute is a comma-separated list, e.g.

    Code:
    Menu1,Menu2,Menu3
    The 'Context menu' delegate is called when you select a menu option and the name of the menu option is passed to the delegate.
    Code:
    ////////////////////////////////////////////////////////////////
    // Event delegate for 'contextmenu' event
    proc page1_contacts_field1_contextmenu(action)
            messagebox(action)
    endproc
    The Context Menu is displayed when you right-click on a field in Edit mode (inline edit or full section or page edit).
    The Context Menu is a single level menu, but you can have multiple options.



    Code:
    ////////////////////////////////////////////////////////////////
    // Event delegate for 'click' event
    proc Customers_section2_click()
            Lianja.get("customers.section2").footermenu = '|&{iif(orders.freight > 100.00, "Reject", "Accept")}'
    endproc


    The & character is used for hot key shortcuts (http://www.lianja.com/community/show...highlight=menu), but you can use {} in the menus.











    Desktop/Web/Mobile now handle iOS/Android footer menus and section menus now handle iOS style tab buttons too (prefix with # just like footer menus).
    See below. This is fully responsive no matter what screen resolution or device it is rendered on.






    Q:
    I have created a menu footer by specifying the "custom menu" attribute in "Footer" section as below
    #Prior,Next,Leave Records,Return
    This will create 4 command buttons for me
    May I know how can I tie actions to each of the footer menu actions?
    A:
    Custom footer menu delegate in the Advanced section of the Section delegates:




    The delegate is simply called with the caption of the menu button so add an arg to your delegate proc and then compare the arg and act accordingly.




    Q:
    Is there a way to add additional actions on the section action toolbar or the page action toolbar for all my pages in my app?
    For example, if I want a "Copy" or "Export" actions on top of the default "Add","Edit","Delete","Next", etc actions
    A:
    You can use the section menu or the section footer menu to do that.



    Q:
    How is the menues (MNT and MPR) VFP uses?
    A:
    Use of these is deprecated and discouraged in Lianja as they are specific to VFP and are desktop bound.
    Use the section menus or section footers in place of these old FoxPro menus.



    ​All topics in [Answers] alphabetically:http://www.lianja.com/community/show...ll=1#post12352
    Last edited by josipradnik; 2016-12-19 at 01:30.

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