forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Clicking on a greyed-out menu item

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 1974
Location: Yateley, Hants, UK

PostPosted: Fri Mar 29, 2019 5:28 pm    Post subject: Clicking on a greyed-out menu item Reply with quote

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
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5837
Location: Salford, UK

PostPosted: Sat Mar 30, 2019 9:29 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 1974
Location: Yateley, Hants, UK

PostPosted: Sat Mar 30, 2019 2:12 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5837
Location: Salford, UK

PostPosted: Sat Mar 30, 2019 5:51 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 1974
Location: Yateley, Hants, UK

PostPosted: Sun Mar 31, 2019 11:01 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5837
Location: Salford, UK

PostPosted: Wed May 01, 2019 12:25 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group