📚 SAP Business One SDK Help

CreateWidgetInstance Method
See Also  Example
bstrWidgetTypeID
The ID of the widget type.
lRow
The unique ID of the row in which the event occurred.
lColumn
The unique ID of the column in which the event occurred.

Description

Creates a widget instance in the current cockpit at a specified cell (mouse up).

Syntax

Visual Basic
Public Function CreateWidgetInstance( _
   ByVal bstrWidgetTypeID As String, _
   ByVal lRow As Long, _
   ByVal lColumn As Long _
) As Widget

Parameters

bstrWidgetTypeID
The ID of the widget type.
lRow
The unique ID of the row in which the event occurred.
lColumn
The unique ID of the column in which the event occurred.

Example

Creating a Widget Instance at a Desired Grid Cell in the Current Cockpit (C#)Copy Code
//Move a specific widget in the current cockpit 
SAPbouiCOM.Cockpits ckpts = sbo_Application.Cockpits; 
 
//Put an IE browser widget into the current cockpit 
SAPbouiCOM.Cockpit ckpt = (SAPbouiCOM.Cockpit)ckpts.CurrentCockpit; 
 
string strWidgetTypeID = "IE"; 
 
//Put the browser widget into the current cockpit, placing it at (row, col):(2, 2) 
ckpt.CreateWidgetInstance(strWidgetTypeID, 1, 1); 

See Also