Option menu button behavior

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
rfarnold47
Posts: 3
Joined: Sun Jan 05, 2020 5:32 am

Option menu button behavior

Post by rfarnold47 » Sun Jan 05, 2020 5:41 am

hi everyone. I searched for this but didn't find .I am porting an app I created on Mac to Windows. It has several Option Menu buttons. On the mac, the "enable" and "disable" menuitem commands work as expected. however, on Windows, instead of a menu item being greyed-out if disabled, it shows the "(" disable code character in the menu, and permits that option to be selected.

The other menu button styles seem to work properly in this regard, but the option menu is the one I would prefer.

Is there a way to disable/enable menuitems on the Option Menu button in Windows (so that they appear greyed-out and can not be selected in the menu)?

thank you

bogs
Posts: 4890
Joined: Sat Feb 25, 2017 10:45 pm

Re: Option menu button behavior

Post by bogs » Sun Jan 05, 2020 10:45 am

I think it is a glitch on Mac only that what your describing works there. I also think the only way you could simulate it on Windows would be through scripting, and while it wouldn't take a lot**, I'm not sure it would be worth the efforts, since your end user(s) on Win machines would see this as a non standard control.

**Basic method - insert a select/case or if/then structure, determine OS, if it is windows then use marker/variable/custom property that can be read by the rest of your handlers as 'disabled'. Update all handlers to look for the marker/variable/custom property, and set text color of that item to disabled color (gray, off-white, whatever).
Image

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

Re: Option menu button behavior

Post by FourthWorld » Sun Jan 05, 2020 10:49 am

The Windows Human Interface Guidelines do not support disabled items in option controls. With those objects the recommendation for an item that isn't relevant is that it simply be removed.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

rfarnold47
Posts: 3
Joined: Sun Jan 05, 2020 5:32 am

Re: Option menu button behavior

Post by rfarnold47 » Thu Jan 09, 2020 4:46 am

thanks for the helpful feedback!

Post Reply

Return to “Windows”