Pop-Up Menu Super Object equivalent in Pan X

Pop-Up Menu Super Object

Can someone give me clue on what the equivalent in Pan X is of Pop-Up Menu Super Object that was in Pan 6?

I use push buttons a lot but would like a pull down push button which will have a Menu Name and if activated will execute a procedure.

Example

A database of Restaurants and as a submenu what style of Restaurant.

Main Button — Restaurant

Sub Menus

Italian

Greek

Chinese

American

Mexican

French.

If the Sub menu Chinese was activated a procedure is enabled that selects only Chinese Restaurants and likely some other functions like alphabetizing.

I hope that I have explained it clearly.

Thank you.

Have you tried Popup Menu Button Object in the Help menu?

To me, it seems like the Main menu could be ethnicity, popping up Chinese, Italian, etc, then the submenu would be restaurants that fit the ethnic choice…perhaps followed by (links to?) their menu items (.pdf?).

Note that, although popup menus may be created easily to be triggered in various ways, attaching submenus doesn’t work. See this thread from 2½ years ago in which Jim put me straight on several misconceptions:

He wrote then, ‘For now, the documentation is wrong, submenus cannot be used with a popup menu. Well, sort of, with the hack you’ve discovered, but that is not by design and not supported. It’s possible (perhaps probable) that if/when this bug is fixed, your hack may stop working. Sorry.’

And that ‘hack’ no longer works, as predicted.

Here is a concrete example.

Those 4 pushbuttons each activate a different procedure for finding when a record was first created, last modified, created today, or records created from today back an inputed number of days.

They take up a lot of real estate so I would like to have a main button or pull down menu and those 4 push buttons get presented when I click on the main button or pull down menu.

It seems pretty plebian to me and I just would like to know if possible. And maybe how to do it.

Thanks for your help. It seems like stuff much more advanced than what I want to do is possible. It is dazzling the options. Jim has basically thought of everything.

If I understand what you want to do, this is something I do all the time. Place on your form a Popup Menu Button using comma separated values, Enter in the formula

Select Date,(-,Find Date Record Created, Created Today, Last Modified Range, Last Date Created Range

and assign a variable in the Data space of the Options named, in my example, fgPickDate. The button looks like this:

Then enter in the buttons procedure code like this:

if fgPickDate="Find Date Record Created"
    fgPickDate="Select Date"
    //[Put code here or call procedure--Good place to use callwithin!]
elseif fgPickDate="Created Today"
    fgPickDate="Select Date"
    // [Put code here or call procedure]
elseif fgPickDate="Last Modified Range"
    fgPickDate="Select Date"
     //[Put code here or call procedure]
elseif fgPickDate= "Last Date Created Range"
    fgPickDate="Select Date"
    // [Put code here or call procedure]
endif
showvariables fgPickDate

Including the line fgPickDate=“Select Date” returns the button message ‘Select Date’ after each choice, but you can and may want to leave the selection visible.

You could use the popupclick statement as well, which can be triggered after clicking any type of object, not just popup menus.

I think that this is all you need in the procedure tab for whichever object you pick:

let lvChoice = ""
popupclick commatocr("Find Date Record Created,Created Today,Last Modified Range,Last Date Created Range"),"",lvChoice

case lvChoice="Find Date Record Created"
// Your code here
case lvChoice="Created Today"
// Your code here
.
.
.
endcase

Thank you all.

I tried Cooper T’s suggestions and it works like a charm. That was before Hugo’s comments, which I will also try.

I certainly would have struggled for DAYS without your help. Frankly I am not sure I would have ever figured it out.

Once again the guys on the White Horses sporting White Hats save the day.

This is truly satisfying.

George

You can find all of this and more in the Help page for Popup Menu Button. So I think you would have figured this out. Same for Popupclick.

1 Like

Thanks again CooperT,

I have to confess that I have to play with the help menu more. I have difficulty with it sometimes.

Mea culpa but I really do.

Help software and interface has to be one of the most challenging tasks. I’m guessing that in many cases the person doing the software already knows what he is doing and does not need “help”.