|
The Inspector is designed to manipulate visual controls.
This is done with using the .NET Forms Designer technology,
the same technology used in the Forms Designer of Visual
Studio .NET.
Here we see two controls from the Microsoft Forms type library
on the design surface. Note that they can be resized or
moved using the forms designer.
Below we present a small example of adding an item to the combo
box and tracing the events associated with this visual control.
|
|
This view of the object tree for the control shows the
methods, including AddItem that can be used to add an
item to the control.
Below the methods are the events. Event logging can be
enabled for single events by right-clicking on the event and
selecting the Event Logging menu item. It can also be
enabled for all events of the object.
|
|
Here are the parameters associated with the AddItem method.
The first being the value to add, "item4" in this case, and
the next being the index.
Note that you can specify either a scalar, string, or object
value for the parameters and the Inspector converts it
appropriately.
|
|
This shows an event trace of a mouse clicking on the combo
box. You can see, by looking at the event
incarnation number (77), that the MouseUp event is what causes
things to happen. Since the last 4 events have the same
incarnation number, they were caused by the MouseUpEvent.
|
|
The details of the MouseUp event, showing a link to the
event in the object tree, the parameters, and the stack
trace information.
|
|
The new item is present in the combo box as we look at the
design surface in run mode.
The Inspector is unique
in that it enables you to change in place from design
mode to run mode. This means that you can use the same
objects in both modes to immediately see how changes to the
design state affect the running of the object.
|
|
|
|
|