Assign a procedure to double-click bars on a Gantt chart

  • 25 April 2019
  • 3 replies

Userlevel 4
  • AIMMS Implementation Partner
  • 57 replies
In WinUI (SO yesterday) we have the ability to assign a procedure to the on-double-click action in a Gantt chart. Is there yet a way to do this in WebUI?


Best answer by Chris Kuip 26 April 2019, 21:38

View original

3 replies

Userlevel 5
Badge +5
Hi Bon,

There is no upon double click for WebUI and we don't expect one to be built. WebUI is built on top of a regular browser. Many actions possible in WinUI will not be possible in WebUI because WinUI is a special UI environment in its own whereas these actions will correspond to a browser action in WebUI (eg, right click - in WinUI you can specify custom menus to open on right click but it won't be available in WebUI). For this reason, WebUI will not be and is not supposed to be completely equivalent to WinUI.

You might already know, but you can have an Upon selection procedure by specifying a store focus element parameter in the gantt and using a UponChange_storefocus procedure.
Userlevel 4
Thanks @mohansx!

That's good to know that it won't be available.

Also, I'm indeed already using the Store Focus and the UponChange_ procedure. But this gives me an idea.

Perhaps I can add a button that will become visible only when a Gantt chart bar is selected that can launch the corresponding WinUI double-click procedure!

YES! That should do the trick.

Thanks for your answer and the inspiration!
Userlevel 5
Badge +7
Hi Bon,

Perhaps an alternative to making a button visible/invisible is to use Widget Actions and making selected actions visible/invisible. Admittedly, these widget actions are not officially released yet, but a preview is available, see

Let the parameter sp_GanttChartWidgetActions with declaration

StringParameter sp_GanttChartWidgetActions {
IndexDomain: (i_WidgetActionOrder,webui::indexWidgetActionSpec);
InitialData: {
data table
'displaytext' 'icon' 'procedure' 'state'
1 "Fix all" "aimms-lock" "pr_GCWA_FixAll" "Active"
2 "Unfix all" "aimms-unlocked" "pr_GCWA_UnFixAll" "Active"
3 "Fix Focus" "aimms-screwdriver" "pr_GCWA_FixFocus" "Hidden"
4 "UnFix Focus" "aimms-knife" "pr_GCWA_UnFixFocus" "Hidden"

be associated as widget action with a Gantt Chart.

In the store focus UponChange procedure we add the following lines:
sp_GanttChartWidgetActions('3','state') := "active" ;
sp_GanttChartWidgetActions('4','state') := "active" ;

Then before selecting a job, the widget menu will look like

And after selecting a job, the widget menu will look like


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator