Cascading Menus
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Cascading Menus
How does one get pull down menu button to populate from database (MySQL) and have those items be able to be selected as menu items, then send that selection to the next button, and the next button.The button sequence is State->City->Facilities List->List of events at that facility in DataGrid.
Succinct answers with code only.
Succinct answers with code only.
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Cascading Menus
Hi.
Anyway.
However you read data from any source, all four styles of menu-like buttons use tabs within the contents of the button to format menuItems and subMenuItems. Do you know about this, especially that buttons are containers, though this may not be obvious? If not, please read about it in the user guide. I also recommend that you create a button and play with it. Start off by placing something like this in it:
That sort of thing. I assume you are familiar with such things as the "menuHistory" and the "selectedText"? In other words, try this in the button script:
Is this of some help?
Craig Newman
What, you will not read any other form of reply? The helpers here are all volunteers, you see.Succinct answers with code only.
Anyway.
However you read data from any source, all four styles of menu-like buttons use tabs within the contents of the button to format menuItems and subMenuItems. Do you know about this, especially that buttons are containers, though this may not be obvious? If not, please read about it in the user guide. I also recommend that you create a button and play with it. Start off by placing something like this in it:
Code: Select all
Choice 1
Choice 2
[tab] SubChoice 1
[tab]subChoice 2
[tab][tab] subSubChoice 1
[tab][tab] subSubChoice 2
Choice 3
Code: Select all
on menuPick pItemName
put pItemName && the selectedText of me && the menuHistory of me && the label of me into fld 1
end menuPick
Craig Newman
Re: Cascading Menus
If I can help it. Not relative to anyone's work status.
I will look into those.
Thank you.
I will look into those.
Thank you.
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Cascading Menus
Good luck. Write back with your findings.
Note that even though I placed that menuItem list in a code tagged section, I meant that the contents of the button was to be set to that text.
Craig
Note that even though I placed that menuItem list in a code tagged section, I meant that the contents of the button was to be set to that text.
Craig
Last edited by dunbarx on Mon Mar 28, 2016 6:25 pm, edited 1 time in total.
Re: Cascading Menus
Will do.
What I'm building is hopefully probably something a lot of folks might be able to use, a state, city, facility, pulldown menu using database selected items. I see lots of them around. I have one that works in php.
Any input appreciated.
What I'm building is hopefully probably something a lot of folks might be able to use, a state, city, facility, pulldown menu using database selected items. I see lots of them around. I have one that works in php.
Any input appreciated.
Re: Cascading Menus
Instead of reinventing the wheel I used a static list of the 50 states. Then used that choice to query the database. Putting that result into DataGrid was next. I decided not drill down any further, in displaying the data by city instead of state. Problem solved.
Thanks.
Thanks.