Context Menu Selections

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
DaveLClarkI
Experienced User
Posts: 165
Joined: Wed Dec 11, 2013 10:40 am
First Name: Dave
Last Name: Clark
Company Name: WinWholesale, Inc.
Phone: 937-294-5331
Address 1: 31101 Kettering Blvd.
City: Dayton
State / Province: Outside Canada/USA
Zip / Postal Code: 45439
Country: United States
Contact:

Context Menu Selections

Post by DaveLClarkI »

I have a grid row context menu which has options that may not all be available at a given time. What I would prefer is to not have to rebuild the content and resize the context menu each time. I would prefer to just disable (grey out) those selections that are not currently available. I can do that with native JavaScript; but, how do I accomplish that with the Profound menu widget? Thanks.
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Context Menu Selections

Post by David »

You can apply any property to a widget through scripting with this:

http://www.profoundlogic.com/docs/displ ... opValue%29

Such as 'choices', etc. for a menu.

Most of the time, if you are applying a property that is not a simple CSS-type of thing, the properties are only used at the time the widget is constructed. So it's most often recommended to apply the 'field type' (see properties window for appropriate value) of the widget after you are doing making changes. This basically triggers a re-render of the component, so that it will pick up any changes to the properties.
DaveLClarkI
Experienced User
Posts: 165
Joined: Wed Dec 11, 2013 10:40 am
First Name: Dave
Last Name: Clark
Company Name: WinWholesale, Inc.
Phone: 937-294-5331
Address 1: 31101 Kettering Blvd.
City: Dayton
State / Province: Outside Canada/USA
Zip / Postal Code: 45439
Country: United States
Contact:

Re: Context Menu Selections

Post by DaveLClarkI »

Yes, that is what I was referring to by "rebuild the content" but I prefer all choices to show and just grey out (disable) the ones that don't currently apply.

An example is when you are typing in this reply box and you right-click with nothing highlighted. The resulting context menu shows the Cut, Copy, and Delete selections greyed out (not available for use). If you highlight something and right-click, then the resulting context menu shows the Cut, Copy, and Delete selections as available for use.
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Context Menu Selections

Post by David »

The menu widget does not have even the concept of a 'disabled' option, so there is not a way of doing that through any built-in interfaces, sorry.

I can help with resizing (you also mentioned having to do that), though -- you can simply leave the 'height' property of the widget unset. It will expand/collapse to fit the choices that are inside.
DaveLClarkI
Experienced User
Posts: 165
Joined: Wed Dec 11, 2013 10:40 am
First Name: Dave
Last Name: Clark
Company Name: WinWholesale, Inc.
Phone: 937-294-5331
Address 1: 31101 Kettering Blvd.
City: Dayton
State / Province: Outside Canada/USA
Zip / Postal Code: 45439
Country: United States
Contact:

Re: Context Menu Selections

Post by DaveLClarkI »

Are custom widgets supported in the PUI designer that are not based on current widgets? I ask from the standpoint of whether I'm able to contemplate creating a new type of menu that supports enabled/disabled menu selections.
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Context Menu Selections

Post by David »

Yes, widgets can be created 'from scratch':

http://www.profoundlogic.com/docs/displ ... om+scratch

It might be more productive to get us to do it, though. :-). We could add such a feature, if you think it would be more helpful to have it done that way? I think that this would be a good feature for the widget, in general. I couldn't guarantee a date on this, though, although I could keep you updated on progress.

This way, you could proceed with your application, just remove the unnecessary options for now, until we can update it.
DaveLClarkI
Experienced User
Posts: 165
Joined: Wed Dec 11, 2013 10:40 am
First Name: Dave
Last Name: Clark
Company Name: WinWholesale, Inc.
Phone: 937-294-5331
Address 1: 31101 Kettering Blvd.
City: Dayton
State / Province: Outside Canada/USA
Zip / Postal Code: 45439
Country: United States
Contact:

Re: Context Menu Selections

Post by DaveLClarkI »

I do think it would be a useful menu type for the designer to have. But, if it will be more than a month to actually get it, then I'm probably going to have to create it myself, anyway.
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests