Alpha Video Training
Results 1 to 7 of 7

Thread: XBasic to change Form's Menu

  1. #1
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,619

    Default XBasic to change Form's Menu

    Sigh

    Just can't find it so checking in here:

    You can change a form's toolbar with XBasic:

    f.toolbar = "Mytoolbar"

    But I can't figure out how to change a menu. Thought this would work:

    f.menuchange("MyMenu")

    but it doesn't.

    Anyone know this one?

    TIA

    - Steve

  2. #2
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,619

    Default

    <bump>
    Anyone?

  3. #3
    Member
    Real Name
    Allen Klimeck
    Join Date
    Apr 2000
    Location
    Colorado
    Posts
    539

    Default menu

    Steve I think that you need:

    :Customers.drop_down_menu = "menu2"

    If customers is your form and "menu2" is you new menu.

  4. #4
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,619

    Default

    Yup, that was it. Because of the property name, I kept passing that over. Thanks.

  5. #5
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,699

    Default Re: XBasic to change Form's Menu

    A bump for this issue. I can get menuchange() to set the menu to "<None>" or to a custom menu, but it won't however load "<System Menu>" . I also tried to set :topparent.name().drop_down_menu = myvar; where myvar = "My Main Menu" and I get the 'argument is incorrect data type'. Why can't this property take a variable? quote(myvar) and eval(myvar) didn't work either.

    Any ideas?

    Well I found one thing - to set the '<system menu>', topparent.menuchange("") will do that at least!
    Last edited by MoGrace; 03-14-2014 at 08:56 PM.
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

  6. #6
    "Certified" Alphaholic Tim Kiebert's Avatar
    Real Name
    Tim Kiebert
    Join Date
    Jul 2004
    Location
    Geelong, Victoria, Australia
    Posts
    2,785

    Default Re: XBasic to change Form's Menu

    Robin,

    this works.

    topparent.drop_down_menu = myvar
    Tim Kiebert
    Eagle Creek Citrus
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

  7. #7
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,699

    Default Re: XBasic to change Form's Menu

    Thanks Tim, I don't remember now why I thought the property needed the form name and could not take a pointer...
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

Similar Threads

  1. xbasic menu
    By BRIAN GRAY in forum Alpha Five Version 6
    Replies: 1
    Last Post: 04-23-2005, 08:26 AM
  2. Change a form's set/table
    By Martin in forum Alpha Five Version 4
    Replies: 3
    Last Post: 08-20-2003, 07:25 AM
  3. Change the menu bar
    By Fred Daniel in forum Alpha Five Version 4
    Replies: 3
    Last Post: 12-09-2002, 10:21 PM
  4. Using xbasic to hide a menu
    By drgarytraub in forum Alpha Five Version 5
    Replies: 2
    Last Post: 07-27-2002, 06:37 AM
  5. Is Form's Timer value Settable in XBasic?
    By csda1 in forum Alpha Five Version 4
    Replies: 1
    Last Post: 10-17-2000, 04:55 PM

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
  •