It is currently 26 January 2020, 20:16 Advanced search

How to link actions with Command?

Questions and answers on how to best use Instant Developer

How to link actions with Command?

Postby Girish » 23 September 2019, 12:03

I want to create a command run time and assign it to mainmenu (which is doable as shown in code below), but at the same time i want to open a form on click of this command. So my question is, How to link/assign command with action?


Code: Select all

IDCommand idc = new()
idc.caption = "Open Customer"
idc.enabled = true
idc.visible = true
MainMenu.addCommand(idc)
//on click of this IDCommand I want to open a form

User avatar
Girish
 
Posts: 12
Joined: 24 January 2019, 10:40

Re: How to link actions with Command?

Postby ljwilson » 2 October 2019, 19:32

Girish,

Did you figure this out? Looks like it could be done with the On Command (event):
https://doc.instantdeveloper.com/eng/?ARTID=031CF0A4-E170-4C01-84F2-6742144591ED&LANG=eng

From the Help:
Notes
•To set the features of a menu completely dynamically, you can link the Commands in the Command Set to an empty procedure, and then in the OnCommand event handle the user's selections depending on how the CommandSet was dynamically populated.


...jack
ljwilson
 
Posts: 503
Joined: 26 November 2013, 14:15


Return to Tips & Tricks

Who is online

Users browsing this forum: No registered users and 5 guests