Page 1 of 1

TIWCGJQVertMenuItem enhancements

PostPosted: 14 Mar 2018 06:56
by davenovo
It would be really helpful if the TIWCGJQVertMenuItem behaved more like a standard TMenuItem. It could have its own OnClick, its own Action property etc.

The standard today is to have the business logic of the form in a separate "viewModel". Having Actions is key to doing that, as the ViewModel can simply change the Action's properties without worrying what visual control the action is bound to. The VertMenu it a great control, but having finer grained controls over the menu items via actions would be very helpful.

Re: TIWCGJQVertMenuItem enhancements

PostPosted: 14 Mar 2018 18:08
by Alexander Bulei
Hi davenovo,

Unfortunately, it's not possible due the jquery plugin architecture. The plugin have only one listener for click (for all items).

Best Regards.

Re: TIWCGJQVertMenuItem enhancements

PostPosted: 14 Mar 2018 18:22
by davenovo
Hello,

Can you fake it? i.e. give each TIWCGJQVertMenuItem an .Action property.
You then handle the click event of the Menu, figure out which menu item was clicked, then call Action.Execute on the menuItems action.

The .Action could still be used to control visibility, enabled, caption etc of each menu item.