Alpha Video Training
Results 1 to 3 of 3

Thread: Toggle form / browse

  1. #1
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,712

    Default Toggle form / browse

    Quick tip. Unlike some, I do often let users have access to browse mode from a form. I also sometimes set a primary index in OnInit for the form.

    One issue is that OnInit is executed each time you toggle from browse view to form view. I would prefer that the index not be reset by anything in OnInit when toggling back to from view. The following script on a custom menu item does that.

    'toggle form / browse view, custom menu item.
    'form OnInit can set index when form first loaded
    'but toggling between browse and form will not change primary index.
    'OnInit is executed when toggling browse to form, but not form to browse.

    IF this.class() = "browse"
    i = table.current().index_primary_get()
    this.toggle_formbrowse()
    xbasic_wait_for_idle() ' needed
    table.current().index_primary_put(i)
    ELSE
    this.toggle_formbrowse()
    END IF

    Bill.

  2. #2
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,643

    Default RE: Toggle form / browse

    Nice tip. This is one for the Code section.

  3. #3
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,712

    Default RE: Toggle form / browse

    Good point. done.

Similar Threads

  1. Form and Browse toggle
    By LeeG in forum Alpha Five Version 6
    Replies: 16
    Last Post: 01-13-2008, 06:20 PM
  2. F8 Companion Browse Toggle Error
    By Lynda Huddleston in forum Alpha Five Version 5
    Replies: 1
    Last Post: 03-28-2005, 06:30 AM
  3. Toggle form / browse view
    By Bill Parker in forum Code Archive
    Replies: 0
    Last Post: 09-03-2004, 07:34 AM
  4. Form & Browse Toggle with Correct Record
    By debwelch in forum Alpha Five Version 5
    Replies: 5
    Last Post: 03-16-2004, 10:44 AM
  5. How to toggle browse/view as A4
    By Steve Pick in forum Alpha Five Version 5
    Replies: 7
    Last Post: 12-30-2002, 04:48 AM

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
  •