Results 1 to 6 of 6

Thread: exiting a browse with a keypress other then clicking a button

  1. #1
    Member
    Join Date
    Jan 2014
    Location
    Netherlands, Middelburg
    Posts
    34

    exiting a browse with a keypress other then clicking a button

    i created a browse window filled with customer records to select a customer for editing.
    the result is a nice popup browse containing these records and 2 buttons cancel en done.
    The arrow buttons work to select a record but i have to use the mouse to double click the record or click done to exit the browse and move further thru the code.
    i like to know how to create a combination of keys like CTRL+ENTER to exit the browse and continue in the code.

    kind regards Léon

    if !rlookup("h_part",debiteuren,"sub_nr")
    m_select = select()
    m_recno = recno(so_hdr)
    select sub_nr,acct_name,city from debiteuren where upper(vFld5) $ acct_name order by sub_nr into cursor rpl_deb
    select rpl_deb
    browse caption "Debiteuren" noedit noappend nodelete noactionbar;
    fields rpl_deb.sub_nr:h="Code", ;
    rpl_deb.acct_name:h="Naam" , ;
    rpl_deb.city:h="Plaats" size 600,400 title "Selecteer een debiteur"
    select m_select
    if _result != 0
    goto _result in rpl_deb
    lianja.get("orders.orders").grid.goto(nRecno_hdr)
    replace in so_hdr so_hdr.rpl_del with rpl_deb.sub_nr

    Lianja.showDocument("section:overzicht_detail?acti on=refresh")
    Lianja.showDocument("section:orders?action=refresh ")
    lianja.get("orders.orders").grid.goto(nRecno_hdr)
    lSucces = .t.

    endif
    endif

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,717
    Blog Entries
    17
    Hi Leon,

    I've changed the code so that pressing return / enter will act as if the "Done" button is clicked. The "Cancel" and "Done" buttons are hidden unless BROWSE PROPERTIES "showbuttons=true" is specified.

    Press Escape to "Cancel" and Enter for "Done".
    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

  3. #3
    Member
    Join Date
    Jan 2014
    Location
    Netherlands, Middelburg
    Posts
    34
    Hi Barry,

    many thanks, working in order entry systems work faster with less mouse usage.

  4. #4
    Member
    Join Date
    Jan 2014
    Location
    Netherlands, Middelburg
    Posts
    34
    Hi Barry,

    maybe it is an idea to do this in the showdialog and showdialogpanel windows with buttons too?

    Kind Regards

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,717
    Blog Entries
    17
    Hi Leon,

    I’ll have a look.
    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

  6. #6
    Member
    Join Date
    Jan 2014
    Location
    Netherlands, Middelburg
    Posts
    34
    Hi Barry,

    this works super, many thanks

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