view release on metacpan or search on metacpan
demos/cursor.pl view on Meta::CPAN
$cursor = $TOP->CursorControl;
$wid{mainframe} = $TOP->Frame()->grid( -sticky => 'nsew' );
$wid{frame} = $wid{mainframe}->Frame( -relief => 'sunken', -bd => 3 )->grid(
-row => 0,
-column => 0,
-columnspan => 4,
-sticky => 'nsew'
);
$wid{canvas} = $wid{frame}->Canvas(
-width => 240,
-height => 240,
demos/cursor.pl view on Meta::CPAN
-options => [ 'Screen', 'Canvas', 'Rectangle Item' ]
)->grid(
-row => 4,
-column => 0,
-sticky => 'nsew',
-columnspan => 3
);
$wid{mainframe}->Checkbutton(
-text => "Hide Cursor",
-onvalue => 'hide',
view all matches for this distribution
view release on metacpan or search on metacpan
DBIx/Form.pm view on Meta::CPAN
$dialog->Label(
-fg => 'red',
-justify => 'left',
-textvariable => \$obj->{ status },
)->grid(-sticky => 'nw', -columnspan => 2);
return $save;
}
# ------------------------------------------
view all matches for this distribution
view release on metacpan or search on metacpan
demos/date.pl view on Meta::CPAN
$row = 0;
@w = @l1 = @l2 = ();
$f->Frame(-background => $black, -height => 1
)->grid(-row => $row++, -column => 0,
-columnspan => 7, -sticky => 'ew');
$f->Label(-text => 'Description')->grid(-row => $row, -column => 0,
-sticky => 'w');
$f->Frame(-background => $black, -width => 0,
)->grid(-row => $row, -column => 1, -sticky => 'ns');
demos/date.pl view on Meta::CPAN
$f->Label(-text => 'Tie')->grid(-row => $row, -column => 6,
-sticky => 'w');
$f->Frame(-background => $black, -height => 1
)->grid(-row => ++$row, -column => 0,
-columnspan => 7, -sticky => 'ew');
$f->Frame(-height => 1
)->grid(-row => ++$row, -column => 0,
-columnspan => 7, -sticky => 'ew');
$f->Frame(-background => $black, -height => 1
)->grid(-row => ++$row, -column => 0,
-columnspan => 7, -sticky => 'ew');
$row++;
single_widget('Empty date/time widget');
single_widget('Only date', -fields => 'date');
demos/date.pl view on Meta::CPAN
if (defined $w[$i]->cget(-variable)) {
warn " $i: " . $ {$w[$i]->cget(-variable)} . "\n";
}
}
})->grid(-row => $row, -column => 0,
-columnspan => 7, -sticky => 'ew');
$getvalb->invoke();
}
sub single_widget {
my($desc, %args) = @_;
demos/date.pl view on Meta::CPAN
)->grid(-row => $row, -column => 5, -sticky => 'ns');
$l2[$i] = $f->Label(-textvariable => \$var[$i]
)->grid(-row => $row, -column => 6, -sticky => 'w');
$f->Frame(-background => $black, -height => 1
)->grid(-row => ++$row, -column => 0,
-columnspan => 7, -sticky => 'ew');
my $index = $i;
$i++; $row++;
$index;
}
view all matches for this distribution
view release on metacpan or search on metacpan
DateEntry.pm view on Meta::CPAN
$w->{_backbutton}=$fr->$Button(-text=>'<<',-pady=>1,-padx=>1,-bd=>1,
-command=> ['prevMonth', $w])
->grid(-row=>0,-column=>0);
# 2. Label to put the monthname in:
$w->{_monthlabel} = $fr->Label->grid(-row=>0,-column=>1,-columnspan=>5);
# 3. Next month:
$w->{_nextbutton}=$fr->$Button(-text=>'>>',-pady=>1,-padx=>1,-bd=>1,
-command=>['nextMonth', $w])
->grid(-row=>0,-column=>6);
view all matches for this distribution
view release on metacpan or search on metacpan
EntryDialog.pm view on Meta::CPAN
if (defined $text and length ($text)) {
my $l1 = $w->Component (Label => 'textlabel',
-textvariable => \$w->{Configure}{-textlabel},
-font => $w -> {Configure}{-font});
$l1->grid( -column => 1, -row => 1, -padx => 5, -pady => 5,
-sticky => 'ew', -columnspan => 5 );
$w->Advertise('textlabel' => $l1);
$w -> Subwidget ('entry') ->
grid ( -column => 1, -row => 2, -padx => 5, -pady => 5,
-sticky => 'ew', -columnspan => 5 );
$w -> Subwidget ('acceptbutton') ->
grid( -column => 2, -row => 3, -padx => 5, -pady => 5,
-sticky => 'new' );
$w -> Subwidget ('cancelbutton') ->
grid ( -column => 4, -row => 3, -padx => 5, -pady => 5,
EntryDialog.pm view on Meta::CPAN
$row++ if (defined $args->{-textlabel} and length ($args->{-textlabel}));
my $e1 = $w -> Component (Entry => 'entry',
-textvariable => \$w->{Configure}{-defaultentry});
$e1 -> grid ( -column => 1, -row => $row++, -padx => 5, -pady => 5,
-sticky => 'ew', -columnspan => 5 );
$w -> Advertise ('entry' => $e1);
$e1 -> bind ('<Return>', sub {$w -> Accept});
my $b1 = $w -> Component (Button => 'acceptbutton',
-text => 'Accept',
-default => 'active' );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tk/FormUI.pm view on Meta::CPAN
)
->grid(
-row => $grid_row++,
-rowspan => 1,
-column => 0,
-columnspan => 2,
-sticky => qq{w},
);
}
## Create the label
lib/Tk/FormUI.pm view on Meta::CPAN
## Place the label
$label->grid(
-row => $grid_row,
-rowspan => 1,
-column => 0,
-columnspan => 1,
-sticky => qq{ne},
);
## Place the widget
$widget->grid(
-row => $grid_row,
-rowspan => 1,
-column => 1,
-columnspan => 1,
-sticky => qq{w},
);
## Increment the row index
$grid_row++;
lib/Tk/FormUI.pm view on Meta::CPAN
)
->grid(
-row => $grid_row++,
-rowspan => 1,
-column => 0,
-columnspan => 2,
-sticky => qq{},
);
## Set the form's message
$self->_set_message($win);
lib/Tk/FormUI.pm view on Meta::CPAN
)
->grid(
-row => 0,
-rowspan => 1,
-column => 0,
-columnspan => 2,
-sticky => qq{},
);
## Use an empty frame as a spacer
$win->Frame(-height => 5)->grid(-row => 1);
view all matches for this distribution
view release on metacpan or search on metacpan
FullKeypad.pm view on Meta::CPAN
-text => "Backspace\n\x{21d0}",
-command => sub {$this->_backspace}
)->grid(
-row => 0,
-column => 52 + 0,
-columnspan => $span,
-sticky => 'nsew'
);
$this->Advertise("KPBack" => $kpback);
my $kpenter = $this->Button(
-text => "Enter\n\x{21b5}",
-command => sub {$this->_padpress("\n")}
)->grid(
-row => 2,
-column => 48 + 2,
-columnspan => 2 * $span,
-sticky => 'nsew'
);
$this->Advertise("KPEnter" => $kpenter);
my $kpspace = $this->Button(
-text => "Space",
-command => sub {$this->_padpress(q{ });}
)->grid(
-row => 3,
-column => 44 + 3,
-columnspan => 1.5 * $span,
-sticky => 'nsew'
);
$this->Advertise("KP " => $kpspace);
$this->Advertise("KPSpace" => $kpspace);
my $kpshift
= $this->Button(-text => "Shift", -command => sub {$this->_shift})
->grid(
-row => 3,
-column => 50 + 3,
-columnspan => 1.5 * $span,
-sticky => 'nsew'
);
$this->Advertise("KPShift" => $kpshift);
# More specialty keys
FullKeypad.pm view on Meta::CPAN
-text => "Caps\nLock",
-command => sub {$this->_caps}
)->grid(
-row => 2,
-column => 0,
-columnspan => 1.5*$span,
-sticky => 'nsew'
);
$this->Advertise("KPCaps" => $kpcaps);
my $kpdel = $this->Button(
-text => "Delete",
-command => sub {$this->_delete}
)->grid(
-row => 0,
-column => 60,
-columnspan => $span,
-sticky => 'nsew'
);
$this->Advertise("KPDel" => $kpdel);
my $kpleft = $this->Button(
-text => "\x{2190}",
-command => sub {$this->_arrow(-1)}
)->grid(
-row => 1,
-column => 60,
-columnspan => $span,
-sticky => 'nsew'
);
$this->Advertise("KPLeft" => $kpleft);
my $kpright = $this->Button(
-text => "\x{2192}",
-command => sub {$this->_arrow(1)}
)->grid(
-row => 2,
-column => 60,
-columnspan => $span,
-sticky => 'nsew'
);
$this->Advertise("KPRight" => $kpright);
my $kpclr = $this->Button(
-text => "Clear",
-command => sub {$this->_clear}
)->grid(
-row => 3,
-column => 60,
-columnspan => $span,
-sticky => 'nsew'
);
$this->Advertise("KPClear" => $kpclr);
$this->ConfigSpecs(
FullKeypad.pm view on Meta::CPAN
-text => $txt,
-command => sub {$this->_padpress($key);},
)->grid(
-row => $row,
-column => $i * $span + $row,
-columnspan => $span,
-sticky => 'nsew'
);
$this->Advertise("KP$key" => $btn);
++$i;
}
view all matches for this distribution
view release on metacpan or search on metacpan
NumEntry.pm view on Meta::CPAN
my $val = shift;
$$var = $val ? 1 : 0;
my $e = $f->Subwidget('entry');
my %info = $e->gridInfo; $info{'-sticky'} = 'news';
delete $info{' -sticky'};
$e->grid(%info, -columnspan => $val ? 1 : 2);
$e->raise;
}
$old;
}
view all matches for this distribution
view release on metacpan or search on metacpan
$msglist->{$current_top} ne "") {
$row++;
$msgobj = $current_page->Label(-text => $msglist->{$current_top},
-justify => "left",
)->grid(-row => $row, -column => 0,
-columnspan => 3);
}
foreach $opt (@{$optlist->{$current_top}}) {
my $f = $current_page;
$row++;
if (_is_separator($opt)) {
my $separator = $f->Frame(-height => 2,
)->grid(-row => $row,
-column => 0,
-columnspan => 3,
-pady => 3,
-padx => 3,
-sticky => "ew");
$separator->configure
(-fg => $separator->cget(-bg),
view all matches for this distribution
view release on metacpan or search on metacpan
HTML/Handler.pm view on Meta::CPAN
-background => 'bgcolor'));
}
$widget->grid(-in => $tw, -row => $table->{Row}, -column => $table->{Col},
config($elem,
-rowspan => 'rowspan',
-columnspan => 'colspan'), -sticky => 'nsew');
pop(@{$h->{'Text'}});
$table->{Col}++;
}
return $f;
}
HTML/Handler.pm view on Meta::CPAN
-background => 'bgcolor'),
-width => 0, -height => 0);
$widget->grid(-in => $tw, -row => $table->{Row}, -column => $table->{Col},
config($elem,
-rowspan => 'rowspan',
-columnspan => 'colspan'), -sticky => 'nsew');
$h->{'widget'} = $widget;
}
else
{
my $widget = $h->{'widget'};
view all matches for this distribution
view release on metacpan or search on metacpan
HexEntry.pm view on Meta::CPAN
my $val = shift;
$$var = $val ? 1 : 0;
my $e = $f->Subwidget('entry');
my %info = $e->gridInfo; $info{'-sticky'} = 'news';
delete $info{' -sticky'};
$e->grid(%info, -columnspan => $val ? 1 : 2);
$e->raise;
}
$old;
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/1.pl view on Meta::CPAN
# # Autodestroy
# my $seconds = 60;
# my $autodestroy_text = "Autodestroy in " . $seconds . "s\n";
# $top->Label(-textvariable => \$autodestroy_text,
# )->grid(-row => 99, -column => 0, -columnspan => 2);
# $top->repeat(1000, sub { if ($seconds <= 0) { $top->destroy }
# $seconds--;
# $autodestroy_text = "Autodestroy in " . $seconds
# . "s\n";
# });
$top->Button(-text => 'Exit',
-command => sub { $top->destroy },
)->grid(-row => 99, -column => 0, -columnspan => 2);
MainLoop;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tk/HyperText.pm view on Meta::CPAN
-underline => $style{underline},
-overstrike => $style{overstrike},
],
);
my @spans = ();
push (@spans, '-columnspan' => $colspan) if defined $colspan;
push (@spans, '-rowspan' => $rowspan) if defined $rowspan;
$browser->grid (
-row => $tabledata->{$tableid}->{row},
-column => $tabledata->{$tableid}->{col},
-sticky => 'nsew',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tk/Image/Cut.pm view on Meta::CPAN
$cut->{canvas} = $cut->Scrolled(
"Canvas",
)->grid(
-column => 0,
-row => 1,
-columnspan => $grid[1],
-sticky => "nswe",
);
#-------------------------------------------------
$cut->{childs} = {
"ButtonSelectImage" => $cut->{button_select_image},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tk/MenuDialog.pm view on Meta::CPAN
## Place the widget
$widget->grid(
-row => $self->_next_row,
-rowspan => 1,
-column => 1,
-columnspan => 1,
-sticky => qq{nsew},
);
## See if button should be disabled
$widget->configure(-state => qq{disabled}) if ($item->{disabled});
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tk/Mirror.pm view on Meta::CPAN
my $label_user = $m->Label(
-text => 'Username ->',
)->grid(
-row => 0,
-column => 0,
-columnspan => 3,
-sticky => 'nswe',
);
#-------------------------------------------------
$m->{bentry_user} = $m->BrowseEntry(
-variable => \$m->{para}{user},
-browsecmd => [\&UpdateAccess, $m, 'user'],
)->grid(
-row => 0,
-column => 3,
-columnspan => 3,
-sticky => 'nswe',
);
#-------------------------------------------------
my $label_ftpserver = $m->Label(
-text => 'FTP-Server ->',
)->grid(
-row => 1,
-column => 0,
-columnspan => 3,
-sticky => 'nswe',
);
#-------------------------------------------------
$m->{bentry_ftpserver} = $m->BrowseEntry(
-variable => \$m->{para}{ftpserver},
-browsecmd => [\&UpdateAccess, $m, 'ftpserver'],
)->grid(
-row => 1,
-column => 3,
-columnspan => 3,
-sticky => 'nsew',
);
#-------------------------------------------------
my $label_pass = $m->Label(
-text => 'Password ->',
)->grid(
-row => 2,
-column => 0,
-columnspan => 3,
-sticky => 'nsew',
);
#-------------------------------------------------
$m->{entry_pass} = $m->Entry(
-textvariable => \$m->{para}{pass},
-show => '*',
)->grid(
-row => 2,
-column => 3,
-columnspan => 3,
-sticky => 'nsew',
);
#-------------------------------------------------
my $label_local_dir = $m->Label(
-text => 'Localdirectory',
)->grid(
-row => 3,
-column => 0,
-columnspan => 3,
-sticky => 'nswe',
);
#-------------------------------------------------
my $label_remote_dir = $m->Label(
-text => 'Remotedirectory',
)->grid(
-row => 3,
-column => 3,
-columnspan => 3,
-sticky => 'nswe',
);
#-------------------------------------------------
$m->{bentry_local_dir} = $m->BrowseEntry(
-variable => \$m->{para}{localdir},
-browsecmd => [\&UpdateAccess, $m, 'localdir'],
)->grid(
-row => 4,
-column => 0,
-columnspan => 3,
-sticky => 'nswe',
);
#-------------------------------------------------
$m->{bentry_remote_dir} = $m->BrowseEntry(
-variable => \$m->{para}{remotedir},
-browsecmd => [\&UpdateAccess, $m, 'remotedir'],
)->grid(
-row => 4,
-column => 3,
-columnspan => 3,
-sticky => 'nswe',
);
#-------------------------------------------------
$m->{tree_local_dir} = $m->Scrolled(
"Tree",
lib/Tk/Mirror.pm view on Meta::CPAN
-itemtype => 'text',
-selectmode => 'single',
)->grid(
-row => 5,
-column => 0,
-columnspan => 3,
-sticky => 'nswe',
);
#-------------------------------------------------
$m->{tree_remote_dir} = $m->Scrolled(
"Tree",
lib/Tk/Mirror.pm view on Meta::CPAN
-itemtype => 'text',
-selectmode => 'single'
)->grid(
-row => 5,
-column => 3,
-columnspan => 3,
-sticky => 'nswe'
);
#-------------------------------------------------
$m->{label_overwrite} = $m->Label(
-text => 'overwrite'
)->grid(
-row => 6,
-column => 0,
-columnspan => 2,
-sticky => 'nswe'
);
#------------------------------------------------
$m->{rbutton_none} = $m->Radiobutton(
-text => 'none',
lib/Tk/Mirror.pm view on Meta::CPAN
-command => [\&Upload, $m],
-state => 'disabled'
)->grid(
-row => 7,
-column => 0,
-columnspan => 2,
-sticky => 'nswe',
);
#-------------------------------------------------
$m->{button_compare} = $m->Button(
-text => 'Compare',
-command => [\&CompareDirectories, $m],
)->grid(
-row => 7,
-column => 2,
-columnspan => 2,
-sticky => 'nsew',
);
#-------------------------------------------------
$m->{button_download} = $m->Button(
-text => '<- Download',
-command => [\&Download, $m],
-state => 'disabled',
)->grid(
-row => 7,
-column => 4,
-columnspan => 2,
-sticky => 'nswe',
);
#-------------------------------------------------
$m->{childs} = {
'LabelUser' => $label_user,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tk/Month.pm view on Meta::CPAN
$self->{title} = $self->Menubutton(
-width => 15,
)->grid(
-row => 0,
-column => 2,
-columnspan => 4,
-sticky => 'nsew',
);
# Positions (0,0), (0,1), (0,6), (0,7) are the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tk/QuickForm.pm view on Meta::CPAN
$notebook = $holder->NoteBook(
# -borderwidth => 1,
)->grid(
-column => 0,
-row => $row,
-columnspan => 2,
-sticky => 'nsew'
);
$self->{NOTEBOOK} = $notebook;
}
my $page = $notebook->add($label, -label => $label);
lib/Tk/QuickForm.pm view on Meta::CPAN
my $h = $holderstack[0];
my $offset = $h->{offset};
my $lf = $h->{holder}->LabFrame(
-label => $label,
-labelside => 'acrosstop',
)->grid(@padding, -column => 0 + $offset, -row => $h->{row}, -columnspan => 2, -sticky => 'nsew');
$lf->gridColumnconfigure(1, -weight => 1);
$holderstack[0]->{row} ++;
unshift @holderstack, {
holder => $lf,
offset => 0,
lib/Tk/QuickForm.pm view on Meta::CPAN
my $h = $holderstack[0];
my $offset = $h->{offset};
my $f = $h->{holder}->Frame->grid(@padding,
-column => 0 + $offset,
-row => $h->{row},
-columnspan => 2,
-sticky => 'nsew',
);
$f->gridColumnconfigure(1, -weight => 1);
$holderstack[0]->{row} ++;
unshift @holderstack, {
lib/Tk/QuickForm.pm view on Meta::CPAN
my $class = shift @opt;
my $w = $self->CreateClass($holder, $class, -validatecall => ['validate', $self], @opt);
$w->grid(
-column => 0,
-row => $row,
-columnspan => 2 + $offset,
-sticky => 'nsew',
-padx => 2,
-pady => 2
);
$options{$key} = $w;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tk/SimpleFileSelect.pm view on Meta::CPAN
my $l = $w->Component( Label => 'entry_label',-text => 'File Name: ');
$l->grid( -column => 1, -row => 3, -padx => 5, -pady => 5 );
my $e = $w->Component(Entry => 'file_entry', -textvariable=>\$w->{Configure}{-initialtext});
$e->grid(-column => 2, -columnspan => 1, -padx => 5, -pady => 5, -row => 3, -sticky => 'e,w' );
$e->bind('<Return>' => [$w => 'Open', Ev(['getSelected'])]);
my $lb = $w->Component(
ScrlListbox => 'dir_list',
-scrollbars => 'se',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tk/Spectrum.pm view on Meta::CPAN
$labValues->Label (
-text => 'Hex:',
)->grid (-column => 0, -row => 1);
my $txtHex = $labValues->Entry (
-textvariable => \$args->{hexval},
)->grid (-column => 1, -row => 1, -columnspan => 5, -sticky => 'ew');
$txtHex->bind ('<Return>', sub {
my $valid = 1;
if (length $args->{hexval} > 7 || length $args->{hexval} < 6) {
$valid = 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
demo/btnstudio.pl view on Meta::CPAN
-resolution => 0.01,
-showvalue => 1,
-variable => \$disperse,
-width => 10,
-length => 250)
->grid(-column => 1, -columnspan => 4, -row => 8, -sticky => 'w');
$cmdframe->Label(-text => 'Angle:')->grid(-column => 0, -row => 9, -sticky => 'e');
$cmdframe->Scale(
-orient => 'horizontal',
-digits => 4,
demo/btnstudio.pl view on Meta::CPAN
-resolution => 0.01,
-showvalue => 1,
-variable => \$angle,
-width => 10,
-length => 250)
->grid(-column => 1, -columnspan => 4, -row => 9, -sticky => 'w');
my $le = $cmdframe->LabEntry(
-label => 'Button text:',
-labelPack => [ qw/-side left -anchor w/],
-bg => 'white',
-textvariable => \$text,
-font => [ -family => 'arial', -size => 12, -weight => 'bold' ])
->grid(-column => 0, -row => 10, -columnspan => 5);
my $font = $le->cget(-font);
$fontinfo = join('-', $font->actual(-family), $font->actual(-size), $font->actual(-weight), $font->actual(-slant));
$cmdframe->Checkbutton(
-text => 'Add image',
-variable => \$image)
->grid(-column => 0, -row => 11, -columnspan => 2);
my $gdbtn = $cmdframe->Checkbutton(
-text => 'Use GD',
-variable => \$gd)->grid(-column => 2, -row => 11, -columnspan => 2);
$gdbtn->configure(-state => 'disabled') unless $hasgd;
$cmdframe->StyledButton(
-style => 'shiny',
-shape => 'oval',
-text => 'Render',
-command => sub { renderButton(); })
->grid(-column => 0, -row => 12, -columnspan => 2);
$cmdframe->StyledButton(
-style => 'shiny',
-shape => 'oval',
-text => 'Rotate',
-command => sub { rotateButton(); })
->grid(-column => 2, -row => 12, -columnspan => 2);
my $started = 1;
renderButton();
MainLoop();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tk/TM/Common.pm view on Meta::CPAN
: new Tk::MainWindow(-title=>Tk::TM::Lang::txtMsg('Login'));
my $rspfd;
my $dsnlb =$dlg->Label(-text=>Tk::TM::Lang::txtMsg('Database'))
->grid(-row=>0, -column=>0, -sticky=>'w');
my $dsnfd =$dlg->Entry(-textvariable=>\$dsn)
->grid(-row=>0, -column=>1, -columnspan=>2, -sticky=>'we');
$dsnfd->configure(-state=>'disabled', -bg=>$dlg->cget(-bg)) if $opt !~/dsn|edit/i;
my $usrlb =$dlg->Label(-text=>Tk::TM::Lang::txtMsg('User'))
->grid(-row=>1, -column=>0, -sticky=>'w');
my $usrfd =$dlg->Entry(-textvariable=>\$usr)
->grid(-row=>1, -column=>1, -columnspan=>2, -sticky=>'we');
my $pswlb =$dlg->Label(-text=>Tk::TM::Lang::txtMsg('Password'))
->grid(-row=>2, -column=>0, -sticky=>'w');
my $pswfd =$dlg->Entry(-textvariable=>\$psw,-show=>'*')
->grid(-row=>2, -column=>1, -columnspan=>2, -sticky=>'we');
my $btnok =$dlg->Button(-text=>Tk::TM::Lang::txtMsg($scr ? 'Login' : 'Ok')
,-command=>
sub{$rspfd->configure(-text=>'Connecting...');
my $curs =$dlg->cget(-cursor);
$dlg->configure(-cursor=>$CursorWait);
lib/Tk/TM/Common.pm view on Meta::CPAN
my $btncn =$dlg->Button(-text=>Tk::TM::Lang::txtMsg('Cancel')
,-command=>sub{if(!$scr && $opt =~/return/i) {$dlg->destroy} else {Tk::exit}})
->grid(-row=>3, -column=>2, -sticky=>'we') if !$scr;
$rspfd =ref($scr) eq 'ARRAY' ? $scr->[1]
:$dlg->Label(-anchor=>'w',-relief=>'sunken')
->grid(-row=>4, -column=>0, -columnspan=>3, -sticky=>'we');
$dsnfd->bind('<Key-Return>',sub{$btnok->invoke});
$usrfd->bind('<Key-Return>',sub{$btnok->invoke});
$pswfd->bind('<Key-Return>',sub{$btnok->invoke});
if (!$scr) {
# $dlg->bind('<Key-Return>',sub{$btnok->invoke});
view all matches for this distribution
view release on metacpan or search on metacpan
eg/woodlice.pl view on Meta::CPAN
$population_scale->set( $population );
$population_frame->grid
(
-column => 1,
-row => 1,
-columnspan => 2,
%pad_opt,
);
my $mode_frame = $option_box->Frame
(
eg/woodlice.pl view on Meta::CPAN
)
->grid
(
-column => 1,
-row => 2,
-columnspan => 2,
%pad_opt,
);
my $light_button = $mode_frame->Checkbutton
(
-text => "Light/Dark",
eg/woodlice.pl view on Meta::CPAN
)
->grid
(
-column => 1,
-row => 1,
-columnspan => 2,
%pad_opt,
);
my $text = $frame->Label
(
-font => 'sserif 12',
eg/woodlice.pl view on Meta::CPAN
);
$frame->grid
(
-column => 1,
-row => 1,
-columnspan => 2,
%pad_opt,
);
my $text = $frame->Label
(
-width => 50,
view all matches for this distribution
view release on metacpan or search on metacpan
SearchDialog.pm view on Meta::CPAN
$s1->grid( -in => $f, -column => 1, -row => 2, -padx => 5, -pady => 5 );
my $replace = $w -> Component( Entry => 'replacestring',
-width => 30,
-textvariable => \$w -> {'Configure'}{'-replacestring'});
$replace -> grid( -in => $f, -column => 2, -row => 2, -padx => 5,
-pady => 5, -columnspan => 3 );
$f -> grid( -in => $w, -row => 1, -columnspan => 5, -sticky => 'ew',
-ipady => 5 );
my $s2 = $w -> Component( Label => 'optionsTitle',
-textvariable => \$w -> {'Configure'}{'-optiontitle'},
-font => $defaultfont );
SearchDialog.pm view on Meta::CPAN
-textvariable => \$w -> {'Configure'}{'-cancellabel'},
-font => $defaultfont,
-default => 'normal',
-command => ['Cancel', $w])
-> grid( -in => $f1, -column => 4, -row => 1, -padx => 20, -pady => 2 );
$f1 -> grid( -in => $w, -row => 7, -columnspan => 5, -sticky => 'ew' );
return $w;
}
sub Show {
view all matches for this distribution
view release on metacpan or search on metacpan
Zinc/Debug.pm view on Meta::CPAN
# matrix
my $r = 0;
my $c = 0;
$fm11->Label(-text => 'matrix', -relief => 'ridge', -bg => $bgcolor)
->grid(-row => $r++, -columnspan => 2,
-ipady => 5, -ipadx => 5, -sticky => 'nswe');
$fm11->Label(-textvariable => \$m00, -relief => 'ridge')
->grid(-row => $r, -column => $c,
-ipady => 5, -ipadx => 5, -sticky => 'nswe');
$fm11->Label(-textvariable => \$m01, -relief => 'ridge')
Zinc/Debug.pm view on Meta::CPAN
my $bgcolor = 'ivory';
my $i = 1;
$fm->Label(-text => $title, -background => $bgcolor,
-fg => 'sienna', -relief => 'ridge')
->grid(-row => $i++, -column => 1, -ipady => 5, -ipadx => 5,
-columnspan => 2, -sticky => 'nswe') if $label;
$fm->Label(-text => 'Option', -background => $bgcolor, -relief => 'ridge')
->grid(-row => $i, -column => 1, -ipady => 10, -ipadx => 5, -sticky => 'nswe');
$fm->Label(-text => 'Value', -background => $bgcolor, -relief => 'ridge')
->grid(-row => $i++, -column => 2, -ipady => 10, -ipadx => 5, -sticky => 'nswe');
Zinc/Debug.pm view on Meta::CPAN
my $bgcolor = 'ivory';
my $i = 1;
$fm->Label(-text => $label, -background => $bgcolor,
-fg => 'sienna', -relief => 'ridge')
->grid(-row => $i++, -column => 0, -ipady => 0, -ipadx => 5,
-columnspan => 7, -sticky => 'nswe') if $label;
&showbanner($fm, $i++);
$i++;
for my $item (@$items) {
my $c = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
demos/demos/widtrib/all.pl view on Meta::CPAN
$f->Label(-text => $separator,
-font => 'Helvetica 18',
-pady => 5,
)->grid(-row => $row,
-column => 0,
-columnspan => 3,
);
next;
}
my $bgcolor = $row%2==0 ? '#c0c0c0' : '#a0a0a0';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tkx/Login.pm view on Meta::CPAN
my $original_pass = $pass;
my $win = $mw->new_toplevel();
$win->g_wm_title("Login");
$win->new_ttk__label(-text => $text )->g_grid( -columnspan => 2 ) if $text;
$win->new_ttk__label(-text => "Username:" )->g_grid( -stick=> 'e', -column => 0, -row => 1 );
my $name_entry = $win->new_ttk__entry(-textvariable => \$user);
$name_entry->g_grid( -column => 1, -row => 1 );
view all matches for this distribution
view release on metacpan or search on metacpan
sub getdsnlogin {
my ($host, $dsn) = @_;
my $dw = new MainWindow (-title => 'Log In');
my $userlabel = $dw -> Label (-text => 'User Name: ')
-> grid (-row => 1, -column => 1, -columnspan => 2,
-padx => 5, -pady => 5);
my $passwordlabel = $dw -> Label (-text => 'Password: ')
-> grid (-row => 2, -column => 1, -columnspan => 2,
-padx => 5, -pady => 5);
my $userentry = $dw -> Entry (-textvariable => \$dsnloginusername)
-> grid (-row => 1, -column => 3, -columnspan => 5,
-padx => 5, -pady => 5);
$dw -> Advertise ('userentry' => $userentry);
my $passwordentry = $dw -> Entry (-textvariable => \$dsnloginpassword,
-show => '*')
-> grid (-row => 2, -column => 3, -columnspan => 5,
-padx => 5, -pady => 5);
$dw -> Advertise ('passwordentry' => $passwordentry);
my $loginbutton =
$dw -> Button ( -text => 'Log In',
-height => 1,
-width => 10,
-command => sub {tablelogin ($dw, $host, $dsn,
$dsnloginusername,
$dsnloginpassword) &&
$dw -> WmDeleteWindow})
-> grid (-row => 3, -column => 1, -columnspan => 4,
-padx => 5, -pady => 5);
my $cancelbutton =
$dw -> Button (-text => 'Cancel',
-height => 1,
-width => 10,
-command => sub {$dw -> WmDeleteWindow})
-> grid (-row => 3, -column => 5, -columnspan => 4,
-padx => 5, -pady => 5);
}
sub tablelogin {
my ($dw, $peer, $dsn, $username, $password) = @_;
sub execute_text_query {
my ($labelptr) = @_;
my $qdialog =
new MainWindow ( -title => 'SQL Query');
my $qtextbox = new_textbox ($qdialog, -height => 15, -width => 60);
$qtextbox -> grid (-row => 1, -column => 1, -columnspan => 2);
$qtextbox -> insert ('end', $userquerytext);
$qdialog -> Advertise ('qtextbox' => $qtextbox);
my $acceptbutton => $qdialog -> Button (-text => 'Submit',
-height => 1, -width => 10,
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/gui.pl view on Meta::CPAN
my $image= $matrix[0][3]->Photo('-file'=>'GUI/rectangle_power_perl.gif');
$matrix[0][3]->configure('-image'=>$image);
my $projectframe=$menu_bar->Frame('-background'=>'grey','-relief'=>'flat','-borderwidth'=>1,'-width'=>80)->grid('-row' => 0, '-column' => 1,'-columnspan'=>2,'-sticky'=>'w');
my $project = $projectframe->Label ('-text'=>'Design:', '-font' => $normal, '-background' =>'grey')->pack('-side' => 'left','-anchor'=>'w', '-fill' => 'x','padx'=>1,'pady'=>1);
$matrix[0][1] = $projectframe->Entry ('-width' => 15, '-font' => $normal,'foreground' => 'black','background' =>'white', )->pack('-side' => 'left','-anchor'=>'w', '-fill' => 'x','padx'=>1,'pady'=>1);
my $projectbutton = $projectframe->Button('-font' => $bold,'background' =>'grey','-text' => 'Set', '-command' => \&set_design)->pack('-side' => 'left','-anchor'=>'w', 'padx'=>1,'pady'=>1);
#==============================================================================
# Device Object Code
$matrix[1][0] = $menu_bar->Label ('-text'=>'Device Object Code', '-width'=>80, '-font' => $bold,'foreground' => 'black', '-background' =>'lightgrey',)->grid(
'-row' => 1, '-column' => 0,'-columnspan'=>4,'-sticky'=>'w');
$matrix[2][3] = $menu_bar->Button('-width'=> 10, '-font' => $bold,'foreground' => 'black','background' =>'grey','-text' => 'Edit', '-command' => \&show_obj)->grid(
'-row' => 2,'-column'=> 3,'-sticky'=>'w');
$matrix[2][2] = $menu_bar->Entry ('-width' => 20, '-font' => $normal,'foreground' => 'black','background' =>'white', )->grid(
'-row' => 2, '-column' => 2);
scripts/gui.pl view on Meta::CPAN
'-font' => $normal,'foreground' => 'black','background' =>'grey','-width'=>0)->grid(
'-row' => 3, '-column' =>0,'-sticky'=>'e');
#==============================================================================
# Device Library Module
$matrix[4][0] = $menu_bar->Label ('-text'=>'Device Library Module', '-width' => 80, '-font' => $bold,'foreground' => 'black','background' =>'lightgrey',)->grid(
'-row' => 4, '-column' => 0,'-columnspan'=>4,'-sticky'=>'w');
$matrix[5][0] = $menu_bar->Button('-width'=> 10, '-font' => $bold,'foreground' => 'black','background' =>'grey','-text' => 'Update', '-command' => \&update)->grid(
'-row' => 5,'-column'=>3,'-sticky'=>'w');
$matrix[5][1] = $menu_bar->Label ('-text'=>'Show module', '-font' => $bold,'foreground' => 'black','background' =>'grey','-width'=>20,'-relief'=>'flat','-borderwidth'=>1,'-anchor'=>'w')->grid(
scripts/gui.pl view on Meta::CPAN
'-row' => 5, '-column' =>0,'-sticky'=>'e');
#==============================================================================
# Testbench Code
$matrix[6][0] = $menu_bar->Label ('-text'=>'Testbench Code', '-width' => 80, '-font' => $bold,'foreground' => 'black','background' =>'lightgrey',)->grid(
'-row' => 6, '-column' => 0,'-columnspan'=>4);
#------------------------------------------------------------------------------
$matrix[7][3] = $menu_bar->Button('-width'=> 10, '-font' => $bold,'foreground' => 'black','background' =>'grey','-text' => 'Edit', '-command' => \&edit_tb)->grid(
'-row' => 7 ,'-column'=>3,'-sticky'=>'w');
$matrix[7][2] = $menu_bar->Entry ('-width' => 20, '-font' => $normal,'foreground' => 'black','background' =>'white',)->grid(
'-row' => 7, '-column' =>2);
scripts/gui.pl view on Meta::CPAN
# $matrix[10][0] = $menu_bar->Checkbutton ('-variable' => \$nowarn, '-font' => $normal,'foreground' => 'black','background' =>'grey','-width'=>0,)->grid(
#'-row' => 10, '-column' =>0,'-sticky'=>'e');
#=cut
#------------------------------------------------------------------------------
$matrix[12][0] = $menu_bar->Label ('-text'=>'Output log', '-width' => 80, '-font' => $bold,'foreground' => 'black','background' =>'lightgrey',)->grid(
'-row' => 12, '-column' => 0,'-columnspan'=>4);
#==============================================================================
# Console
my $text_frame = $top->Frame('-background'=>'black', '-width'=>80)->pack('-side' => 'top', '-fill' => 'x');
#
$text=$text_frame->Text('-foreground' => 'grey','-background'=>'black','-height'=>25, '-width'=>80)->pack('-side' => 'left', '-fill' => 'y');
view all matches for this distribution