Hi
I tried that I am still not able to run it.
Here's what I did.
I am using active perl 5.14
Thanks
use strict;
use Tkx;
use constant TRUE => 1;
use constant FALSE => 0;
#Defining UI components.
our $iteration = 0;
our $mw = Tkx::widget->new(".");
$mw->g_wm_title("G7 Fiery.");
$mw->g_wm_minsize(300, 300);
#our $filename = Tkx::tk__getOpenFile();
our $frame = $mw->new_ttk__frame( -padding => "3 3 12 12");
our $label1 = $mw->new_ttk__label(-text => "Iteration");
our $label2 = $mw->new_ttk__label(-textvariable => \$iteration);
our $cb = $frame->new_ttk__button(-text => "Calculate", -command => su
+b {calculate();});
our $cb1 = $frame->new_ttk__button(-text => "open", -command => sub {g
+et_source_filename();});
#Placing objects .
$frame->g_grid(-column => 0, -row => 0, -sticky => "nwes");
$cb->g_grid(-column => 3, -row => 3, -sticky => "w");
$cb1->g_grid(-column => 2, -row => 3, -sticky => "e");
$label1->g_grid(-column => 2, -row => 1, -sticky => "w");
$label2->g_grid(-column => 3, -row => 1, -sticky => "w");
$mw->g_grid_columnconfigure(0, -weight => 1);
$mw->g_grid_rowconfigure(0, -weight => 1);
foreach (Tkx::SplitList($frame->g_winfo_children)) {
Tkx::grid_configure($_, -padx => 5, -pady => 5);
}
sub calculate() {
$iteration ++;
}
sub get_source_filename {
$source_file = Tkx::tk___getOpenFile();
}
Tkx::MainLoop;
|