User defined events for ABL User Control?

tamhas

ProgressTalk.com Sponsor
The answer might depend on what specifically you mean, but 10.2B has strongly typed named events.
 

frndprogress

New Member
Whole scenario is, I created ABL user control with toolstrip(.Net control) having few buttons like 'Add', Save'. Then drag this user control on MDI form.

Now i want to get click event of 'Add' and 'Save' button from MDI form.

As if i define public property for user control and could set that through Property view in MDI form, in the same manner is it possible to get button events in Event tab of Property view of MDI form?

I want to set 'click' event for buttons from MDI form. So user control can achieve behaviour like other .Net controls.

Although i have tried approach of subscribing event for button as...

defvar btn as System.Windows.Forms.ToolStripButton.
btn = THIS-OBJECT:userControl1:btnAdd.
btn:click:SUBSCRIBE(btnAdd_Click).

And added following method in MDI form:

METHODPRIVATEVOID btnAdd_Click( INPUT sender AS System.Object, INPUT e AS System.EventArgs):
message "add button clicked" view-as alert-box.
RETURN.

END METHOD.

Here 'btnAdd' is PUBLIC in userControl. Although it is working fine .....But i want to achieve above through 'Event' tab of Property view where user can subscribe event by adding name of event in view.
 

tamhas

ProgressTalk.com Sponsor
Sounds like 10.2B ... so you will have to be a little patient.

Perhaps someone else will have a work around for you ... I don't do much UI work.
 
Top