Syntax
Success = WidgetSetRowStart(Widget, Row)Description
Sets the starting row index (1-based) for the specified widget within its parent Grid layout. This explicitly positions the widget, overriding the automatic placement flow.
Parameters
Widget
The handle of the ProGUI widget.
Row
The 1-based index of the grid row line where the widget should
start.
Return Value
Returns #True if the starting row was successfully set,
or #False if the widget handle is invalid or the row value
is less than 1.
Remarks
This property is only relevant for widgets placed within a layout of
type #PG_Layout_Type_Grid. Setting the start row triggers a
layout update. If `columnStart`, `columnSpan`, or `rowSpan` have not
been set, they default to 1.
Example
IncludeFile "ProGUI_PB.pbi"
StartProGUI()
MyWindow = CreateWindow(0, 0, 300, 200, "Grid Row Start", #PG_Window_Default | #PG_Window_LayoutGrid) ; Use a grid layout
LayoutSetPadding(#Null, 10) ; Set the current layout padding
LayoutGridSetGapSize(#Null, 5)
; Define 2 columns and 2 rows (auto size)
LayoutGridSetColumn(#Null, 1, #PG_Grid_Auto)
LayoutGridSetColumn(#Null, 2, #PG_Grid_Auto)
LayoutGridSetRow(#Null, 1, #PG_Grid_Auto)
LayoutGridSetRow(#Null, 2, #PG_Grid_Auto)
If MyWindow
; Widget 1 placed automatically (will likely go in column 1, row 1)
Widget1 = CreateWidget(0, 0, 50, 30)
WidgetSetClass(Widget1, "cell1-1")
; Widget 2 explicitly placed in column 1, row 2
Widget2 = CreateWidget(0, 0, 50, 30)
WidgetSetClass(Widget2, "cell1-2")
WidgetSetColumnStart(Widget2, 1) ; Explicitly set column start as well
WidgetSetRowStart(Widget2, 2)
WindowShow(MyWindow, #True, #PG_WindowShow_ScreenCentered)
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
StopProGUI()See Also
WidgetGetRowStart, WidgetSetRowSpan, WidgetSetColumnStart, WidgetSetColumnSpan, LayoutSetType
Supported OS
Windows, Linux