Activating SmartParts

Topics: CAB & Smart Client Software Factory
Jun 16, 2006 at 2:17 AM
originally posted by: juemue

Hi all.

I'm currently checking the features of CAB to find out if we shoulduse it in one of our projects.

My question:
A Workspace contains SmartParts and displays them in a specific way. How do I find out that the currently active SmartPart of a Workspace is going to change and hoe can this change be canceled? (like the BeforeSelectionChangeed event of a TreeView)

Think about the following scenario: the ActiveSmartpart of a Workspace (let's name it EditCustomerSmartPart) shows the data of a Customer and allows to edit that data. The user has changed some data but didn't save the changes back to the DB. Now, he activates another Smartpart of the Workspace and the app should display a MessageBox (Save changes? Yes, No, Cancel). If the user presses Cancel, the Workspace should still show the EditCustomerSmartPart.

I've browsed the examples and the documentation of the CAB, but didn't find a solution for this problem.
...maybe I'm missing something or there is a completely different way to handle this.

Any help appreciated