grid methods

The following methods are associated with widgets managed by grid:

gridColumnconfigure

Configures the column specified by the first argument using -weight and -minsize arguments. The -weight argument determines the amount of space to allocate to that column, and the -minsize argument sets the minimum size in pixels. For example:

$widget->gridColumnconfigure(3, -weight => 1);
gridRowconfigure

Configures the row specified by the first argument using -weight and -minsize arguments. The -weight argument determines the amount of space to allocate to that row, and the -minsize argument sets the minimum size in pixels. For example:

$widget->gridRowconfigure(3, -weight => 1);
gridRemove

Removes each of the $slaves from grid for its master and unmaps their windows. The slaves will no longer be managed by the grid geometry manager. gridRemove remembers the previous configuration options for the window. So, if $slave is managed once more by the grid geometry manager, the previous values will be retained.

gridBbox

Returns the bounding box in pixels for the space occupied by the specified grid position (in the order of column, row). For example:

$widget->gridBbox(3,2);
gridForget

Causes the widget(s) to be removed from view. Additional widgets can be specified as arguments.

$widget1->gridForget($widget2, widget3, ...);
gridInfo

Returns information about the widget in list format:

$widget->gridInfo;
gridLocation

Returns the column and row of the widget nearest the specified x,y coordinates (in pixels): ...

Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.