Cannot see Events


Author
Message
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
I've created a Businessobject. I've created a form and added a few controls, textbox, TabPage and Labels, and set up the bindings to the business object...all seems to be working fine.

I now want to insert some code into the ParentFormLoading but cannot see any of the events.I've right clicked on the Form to view Code but on the dropdown menu at the top of the code file, in the left menu, all I can see is one option, which is the Form. All the objects come up ok on the right hand side for the form.

Am using Ver 1.6.7 (all SF controls say ver 1.6.6.9) and C#

Attachments
Screen.jpg (133 views, 172.00 KB)
Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Your approach will not work in C#.  In VB you can drop down the and select the object from the list on the left.  You cannot do this in C#.  So you can do this one of two ways. 

UI Approach
Open the designer and select the business object.  Then go to the property sheet and select the event display:

This will present all of the events for that object.  At this point, double-click the ParentFormLoading event and it will automatically add the handler and take you to the method definition that gets generated.  Just FYI, the default event for a BO is the ParentFormLoading event, so if you were to just double-click the BO from the form designer it would create this event for you as well.

Code Approach
This is a bit more technical, but in short you would do the same thing that the automated process does for you by creating a handler.  C# is nice in this area in code because when you go to handle an event you can tab and it will create the placeholder methods for you.  But it would look like this:

this.Customers.ParentFormLoading += new MicroFour.StrataFrame.UI.IInitOnFormLoad.ParentFormLoadingEventHandler(Customers_ParentFormLoading);

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search