Specify the width and height of the main window/Tkx Tips

Use the g_wm_geometry method to specify the width and height of the main window.

# Width and height
$mw->g_wm_geometry("600x300");

Width and height are specified in the format "width x height".

If you want to specify the display position at the same time, do as follows.

$mw->g_wm_geometry("600x300 + 200 + 400");

Below is an example.

use strict;
use warnings;

use Tkx;

my $mw = Tkx::widget->new(".");
$mw->g_wm_geometry("600x300");

Tkx::MainLoop ();

Related Informatrion