Silverfrost Forums

Welcome to our forums

Clicking on a greyed-out menu item

29 Mar 2019 4:28 #23408

It should be obvious that a greyed-out menu item is not available for some reasone, and I suppose that this also applies to any control for which there is a grey control. However, I should like to be able to pop up a message to tell a user why the control is greyed out and inaccessible if that user clicks on it.

Example: You can't click on File|Save because the user needs to complete the operation they are working on.

Example: You can't Save the File because you already saved it and there are no changes.

Example: You can't delete the file because you already deleted it.

I can probably get the result I want with a shadow grey code (i.e. one which has the same functionality of inhibiting the operation but doesn't actually grey-out the command) but that makes nothing ever greyed out, which in the Windows paradigm suggests that the command should be always operable.

Or is helping the user in this way something that isn't possible?

Eddie

30 Mar 2019 8:29 #23409

Eddie

Windows does provide a button up event when you click on a disabled menu item but I think that it would be very difficult to distinguish this from any other button up event.

A more promising possibility would be to find a way to change the help string for a menu item depending on whether or not it is disabled. It is quite possible that ClearWin+ could be extended to allow you to do this.

30 Mar 2019 1:12 #23410

Paul,

That's an excellent suggestion, and could be implemented with a '/' separator in the help string itself.

As to 'it would be very difficult to distinguish this from any other button up event.' - surely all the program has to do is to check the grey setting for the particular control? The downside is that perhaps the check would need to be done in every single callback.

Eddie

30 Mar 2019 4:51 #23411

Eddie

As I understand it from the inner workings of ClearWin+, a button up event could come from lots of different user interactions, maybe even just a meaningless click outside of any controls or menus etc.

When I get a chance I will take a look at the processing for the menu help strings to see if this can easily be extended.

31 Mar 2019 10:01 #23412

Thank you Paul, UNless you feel it would be of use to a lot of users, then please don't assign a high priority to it.

Eddie

1 May 2019 11:25 #23562

Eddie

I have implemented this and used a pipe '|' as a separator. Hopefully this won't break any existing code.

It is not in the next release but I will make new DLLs available in due course.

Please login to reply.