📚 SAP Business One SDK Help

MoveWidget Method
See Also  Example
bstrWidgetUID

The unique ID of the widget.

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

Moves a widget to a specified cell (mouse up).

Syntax

Visual Basic
Public Sub MoveWidget( _
   ByVal bstrWidgetUID As String, _
   ByVal lRow As Long, _
   ByVal lColumn As Long _
) 

Parameters

bstrWidgetUID

The unique ID of the widget.

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

Moving a Widget to 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; 
 
//Move the first widget in the current cockpit 
if(ckpts.Count > 0) 

    //Get the current cockpit 
    SAPbouiCOM.Cockpit ckpt = (SAPbouiCOM.Cockpit)ckpts.CurrentCockpit; 
    SAPbouiCOM.Widgets wdts = ckpt.Widgets; 
    if(wdts.Count > 0) 
    { 
        //Move the widget 
        string strWidgetUID = wdts.Item(0).WidgetUID; 
 
        //Move the widget to (row, col):(1, 1). 
        ckpt.MoveWidget(strWidgetUID, 1, 0); 
    } 

See Also