SetFieldsVisibleInBalloon method
Sets which fields are visible in Pushpin balloons for the specified data set.
Applies to
Objects: DataSet
Syntax
object.SetFieldsVisibleInBalloon(ArrayOfFields)
Parameters
Part | Description |
---|---|
object | Required. An expression that returns a DataSet object. |
ArrayOfFields | Required Variant. An array that contains the Field objects to display in the Pushpin balloons. |
Example
[Microsoft Visual Basic 6.0]
Sub ShowOnlySomeFields()
Dim objApp As New MapPoint.Application
Dim objDataSet As MapPoint.DataSet
objApp.Visible = True
objApp.UserControl = True
Set objDataSet = objApp.OpenMap(objApp.Path & "\Samples\Clients.ptm").DataSets(1)
arArray = Array(objDataSet.Fields(1), objDataSet.Fields(2), objDataSet.Fields(3))
'Set which fields will be visible in the Pushpin balloon
objDataSet.SetFieldsVisibleInBalloon arArray
'Show the balloon for the first record
objDataSet.QueryAllRecords.Pushpin.BalloonState = geoDisplayBalloon
End Sub
[C#]
void ShowOnlySomeFields()
{
MapPoint.ApplicationClass objApp = new MapPoint.ApplicationClass();
MapPoint.Map objMap = null;
MapPoint.DataSet objDataSet = null;
MapPoint.Recordset objRS = null;
object key = 1;
object key2 = 2;
object key3 = 3;
//Set up the application
objApp.Visible = true;
objApp.UserControl = true;
objMap = objApp.OpenMap(objApp.Path + "\\Samples\\Clients.ptm", false);
objDataSet = objMap.DataSets.get_Item(ref key);
object[] arArray = {objDataSet.Fields.get_Item(ref key), objDataSet.Fields.get_Item(ref key2), objDataSet.Fields.get_Item(ref key3)};
//Set which fields will be visible in the Pushpin balloon
objDataSet.SetFieldsVisibleInBalloon(arArray);
//Show the balloon for the first record
objRS = (MapPoint.Recordset) objDataSet.QueryAllRecords();
objRS.Pushpin.BalloonState = MapPoint.GeoBalloonState.geoDisplayBalloon;
}