|
-
May 5th, 2022, 08:31 AM
#1
Thread Starter
Fanatic Member
Last edited by tmighty2; May 5th, 2022 at 08:42 AM.
-
May 5th, 2022, 08:42 AM
#2
Re: Setting submenu item Checked results in error 387
To me, it looks like you're trying to set a sub-menu container as checked, and not an actual menu item.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
May 5th, 2022, 08:43 AM
#3
Thread Starter
Fanatic Member
Re: Setting submenu item Checked results in error 387
I have edited my post and showed what I actually wanted to do. As it seems I actually try to check a submenu container, but I don't see what's wrong about that.
-
May 5th, 2022, 08:54 AM
#4
Re: Setting submenu item Checked results in error 387
IIUC, the moment he checks to invite his drunk uncle, that there is also a checkmark at "invite family".
the same the other way round:
the moment he unchecks the last Family-member in his sub-menu (and UNINVITING your mother-in-law is never wrong!),
that the checkmark to invite family-members disappears
Last edited by Zvoni; Tomorrow at 31:69 PM.
----------------------------------------------------------------------------------------
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------------------
People call me crazy because i'm jumping out of perfectly fine airplanes.
---------------------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad
-
May 5th, 2022, 09:11 AM
#5
Re: Setting submenu item Checked results in error 387
Tip: post the test project.
-
May 5th, 2022, 10:06 AM
#6
Re: Setting submenu item Checked results in error 387
The 387 is a long-standing bug. The exception thrown should probably be a 380 "Invalid property value" instead.
But in any case you are attempting an illegal operation. The "Checked" property only applies to menu items, not menu groups. That's because selection has a different meaning for groups vs. items and "Checked" gets toggled via item selection.
I'm sure you can find programs with a broken non-standard UI that appear to do as you wish here. But these almost certainly are manually fiddling with menu bitmaps to simulate checking on a group. I have no idea how the user is expected to interact with such broken messes.
-
May 5th, 2022, 10:57 AM
#7
Re: Setting submenu item Checked results in error 387
In theory, I suppose it would make sense if you could work out a "Checked", "Gray Checked", & "Unchecked" option, with "Gray Checked" meaning partially checked items. And then checking (or unchecking) the group would check (or uncheck) all the sub-items.
But, I've never seen it, and it's definitely going to take some API work to get it done (if it's possible at all).
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|