If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
> I would like to know how I can toggle the state of the menu item between
> disabled and normal.
On the fly? I don't know. What's the UX you're trying to achieve?
This is in my plugin - DenonAvpControl that shows up in apps like iPeng and Squeezer but also on the Touch screen.
I have some related features that only work when a certain setting is turned on. Formally I did not show that menu item but that is sort of confusing (even for myself) and felt it would be better if it was just disabled but still appeared during these conditions.
In PERL I have seen mention of "disabled" and "normal" states for menu items, but I was uncertain if this was just a particular UI tool or in general. It was the "state" feature of a menu item.
Well it turns out that just eliminating the "do=>" in actions will create a disabled menu item. The downside is that the state is not visible to the user.
So now I need to find a way to "gray out" the text for an menu item that has no "do" action.
EDIT: Perhaps removing the "action" area is probably the same. I'll try that.
Such a change is unlikely going to happen. Maybe if you describe your use case we can find some kind of workaround?
The use case is that in some conditions some menu items depend on others higher in the list. For example I have a dynamic equalizer setting that can be on or off in one menu. In another menu the user can adjust the reference level offset of the amplifier, but only if they had pre selected the dynamic equalizer as on.
So I don't want to get rid of the reference level menu because it would come and go and confuse the user. So I detect the state of the dynamic equalizer when building (or rebuilding) the reference level menu. If I find the Dyn Eq off I just leave the Action section off of the menu items. This makes them do nothing when pressed which is good and the way it should be. But they still LOOK like they should react. They are not grayed out like you would expect disabled options to be.
The Squeezer guy implemented the disabled look in his client if he sees a menu item without an action.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment