Code to make popup menu show options without clicking on it.

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Code to make popup menu show options without clicking on it.

Post by dunbarx » Thu Mar 23, 2023 2:19 pm

CAsba.

Do you have access to any other Windows computer? If so, try the idea of building a new stack as I suggested early in this thread. DO NOT bring anything over from your original setup. If that works, then it is clearly something in your machine. If it does not work, then it is something in you yourself. :wink:

But we cannot get past this until we find out what is going on. Remember, other Windows machines seem not to have this issue.

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9823
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Code to make popup menu show options without clicking on it.

Post by FourthWorld » Thu Mar 23, 2023 5:26 pm

Popup menus are designed to respond to user clicks. Working around that will be difficult, but perhaps a kludge may be found. What are you trying to do? That is, please tell us about the context in which a user-driven control needs to activate without user interaction.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

CAsba
Posts: 363
Joined: Fri Sep 30, 2022 12:11 pm

Re: Code to make popup menu show options without clicking on it.

Post by CAsba » Sat Mar 25, 2023 7:28 pm

Hi all,
I thought I'd better let you know how I've got round the problem..
I was wanting to give my user a selection of types, and my first thought was a menu. Faced with the difficulties I mentioned, I decided instead to show a column of radio buttons with the type detail in a field alongside each btn. It's actually going to improve the user experience, as this way I can list only the btns (types) that are relevant to the user according to previous data input from the user.
Thank you all for your help - it still isn't clear what the problem was, but it's no longer an important issue for me, I'm happy to use the radio buttons.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Code to make popup menu show options without clicking on it.

Post by dunbarx » Sat Mar 25, 2023 10:24 pm

CAsba

If that is what you had in mind, I would have made a small stack with controls on it. You can show and hide that at will.

Many have a mindset that stacks are always large rather major foundational elements of an application. They can also be small and numerous little gadgets that do whatever you want, instead of trying to kludge functionality from controls that really don't like that sort of thing.

Craig

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Code to make popup menu show options without clicking on it.

Post by stam » Sun Mar 26, 2023 5:10 am

Agreed - although my preference is for substack rather than stack for things like this - logically hangs together and slightly simpler.
A group is fine, but is not encapsulated to the same extent a stack/substack is and needs more work to use on multiple cards etc.
Then again, if a group works then why not ;)

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Code to make popup menu show options without clicking on it.

Post by dunbarx » Mon Mar 27, 2023 12:20 am

Stam.

Substack for sure. None of my applications have more than one mainStack. I am not sure that warrants bragging about it.

Craig

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Code to make popup menu show options without clicking on it.

Post by stam » Tue Mar 28, 2023 7:16 pm

dunbarx wrote:
Mon Mar 27, 2023 12:20 am
Stam.

Substack for sure. None of my applications have more than one mainStack. I am not sure that warrants bragging about it.

Craig
Craig

if I had the need to brag I certainly could mentioned a long list of things that are brag-worthy (as I'm sure most here could), but trust me, using substacks is not one of them...

I pointed this out as new users may think they have to create a new stackfile - I know I did, when I was brand new to LC ;)
You may take it for granted but new users probably don't even know that you can create substacks.
And while extremely similar, stack ≠ substack, as I'm sure you know well.

But that was not the main point of my comment which was: do you go with a group or with a substack - there are pros and cons to both. Sometimes a group is a quicker/easier option...

Please don't take this a a 'brag' that I sometimes use groups...

S.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Code to make popup menu show options without clicking on it.

Post by dunbarx » Tue Mar 28, 2023 8:33 pm

Stam.

Right on, The best thing about substacks is that they all save in the single stack file to which they belong. Simplifies especially the making of standalones, where you only need to include the main stack file.

I know you know this. But as you say, a new user might be lurking...

Craig

CAsba
Posts: 363
Joined: Fri Sep 30, 2022 12:11 pm

Re: Code to make popup menu show options without clicking on it.

Post by CAsba » Wed Mar 29, 2023 10:18 am

Hi Craig,
Further to yours of the 23rd, I got access to a windows laptop today, and I ran my original stack on it, with the same result, the options appeared momentarily only. No, I didn't try a new script, with it, as limited time access to the laptop.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”