Tk-FormUI
view release on metacpan or search on metacpan
lib/Tk/FormUI.pm view on Meta::CPAN
-text => $err,
-font => $self->error_font,
-anchor => qq{w},
-justify => qq{left},
-foreground => $self->error_font_color,
)
->grid(
-row => $grid_row++,
-rowspan => 1,
-column => 0,
-columnspan => 2,
-sticky => qq{w},
);
}
## Create the label
my $label = $field->build_label($win);
## See if there's an error
if ($err)
{
lib/Tk/FormUI.pm view on Meta::CPAN
-font => $self->error_font,
-foreground => $self->error_font_color,
);
}
## 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++;
## See if this is our first non-readonly field
if (!$first_field && !$field->readonly)
{
$first_field = $field;
lib/Tk/FormUI.pm view on Meta::CPAN
-text => $button_text,
-font => $self->button_font,
-width => length($button_text) + 2,
-command => sub {$result = 1;},
-underline => $underline,
)
->grid(
-row => $grid_row++,
-rowspan => 1,
-column => 0,
-columnspan => 2,
-sticky => qq{},
);
## Set the form's message
$self->_set_message($win);
$self->_watch_variable(\$result);
## Setup any keyboard bindings
$self->_set_key_bindings($win);
lib/Tk/FormUI.pm view on Meta::CPAN
$win->Label(
-wraplength => $max_x,
-text => $self->message,
-justify => qq{left},
-font => $self->message_font,
)
->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);
}
return;
}
lib/Tk/FormUI/Field/Directory.pm view on Meta::CPAN
$self->_entry_widget(
$self->widget->Entry(
-font => $self->font,
-width => $self->width,
-text => $self->default // qq{},
)
)->grid(
-row => 0,
-rowspan => 1,
-column => 0,
-columnspan => 1,
-sticky => qq{e},
);
if ($self->browse_label)
{
$self->_entry_widget->grid(
-row => 0,
-rowspan => 1,
-column => 0,
-columnspan => 1,
-sticky => qq{e},
);
$self->widget->Frame(-width => 3,)->grid(
-row => 0,
-rowspan => 1,
-column => 1,
-columnspan => 1,
-sticky => qq{e},
);
## Create and place the Button
$self->widget->Button(
-font => $self->font,
-text => $self->browse_label,
-width => 2 + length($self->browse_label),
-command => [sub { my $self = shift; $self->_browse;}, $self],
)->grid(
-row => 0,
-rowspan => 1,
-column => 2,
-columnspan => 1,
-sticky => qq{e},
);
}
## Return the widget
return($self->widget);
}
##----------------------------------------------------------------------------
## @fn _browse()
( run in 0.334 second using v1.01-cache-2.11-cpan-a5abf4f5562 )