Maptitude GISDK Help

.NET Control Items

 

A .NET control item allows you to place a .NET control into a dialog box. The format of a .NET control item definition is:

 

Dotnet Control {"item name"} hpos, vpos {, width {, height}} {options} {do

     <statements go here>

     endItem}

 

If the do ... endItem section of the .NET control definition is included, the statements are executed when the control is first initialized and whenever the control fires an event. The object interface to the control is not available during the running of the Init item of the dialog box.

 

 

.NET Control Options

Description

Disabled

The .NET control is initially disabled.

Hidden

The .NET control is initially hidden.

Help: help_specs

Help information displayed in a popup window and the status bar. Help strings can be string expressions.

Prompt: expression

The text that appears to the left of the .NET control. If omitted, there is no text next to the COM control.

Class: expression

The text string with the ProgID of the .NET control.

Object: variable

The variable that will be set to the .NET interface of the control.

Variables: variables

The first variable indicates the name of the event that has been fired by the .NET control, or null when the control is initialized. The second variable contains an array of the parameters passed by the event.

Events: array

An array of strings for the names of the events for which the item macro will be called

 

For example:

 

Dotnet Control 0, 0, 30, 2 Assembly: "System.Windows.Forms" Class: "System.Windows.Forms.DateTimePicker" Object: objvar

Variables: event_name, event_params Events: {"ValueChanged"}

do

if event_name = null then do

    //initialize control

    objvar.Format = "Short"

    end

else do

    //ValueChanged event was fired

    new_value = objvar.Value

    end

endItem

 

 

©2025 Caliper Corporation www.caliper.com