Perl - start search by using search button or by pressing the enter key
The snippet above setups a label, then a box to accept a text based user input. Then a Search button that calls a sub. The way it is written / shown, the search button works as it should. But the search does not execute if I enter text followed by pressing the enter key.
So, the question is, How do I give the user the option to either
input text, then press the enter/return key to begin the search
or
input text, then press the search button to begin the search ?
Neo,
Maybe it would be best to make the search button/option more visible? I know when I came here the first time, I didn't really notice that option. Just an idea. It appears that some people either don't see it.. or the obvious, don't want to use it, but I'd suggest that it's more of the... (8 Replies)
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Hey, I'm writing this BASH script, I recently started learning BASH after I did Java and I'm pretty new to the syntax.
Anways, what I want to do is simple, I coudn't find the right information though:
Let's say I make a :
read -p "Press ENTER to go back to menu" choice
.....
What is... (34 Replies)
I'm trying to learn how to get my script to execute the enter button when it telnets into a router and the router displays output but you need to press the space bar or enter button to continue displaying my output of the router.
How is this done? (0 Replies)
hi experts
Question in perl
i'm creating a script to take from user a different inputs one of them is the carriage return .. so that i want to make an if condition if the user hit enter key the user will go to previous step
it something like that
chomp ($input = <STDIN>);
if ($input =~... (3 Replies)
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
I have a script in which we have used nohup. Once script is executed it will be terminated only when enter key is pressed. I want the script to be terminated without pressing enter key
nohup imqbrokerd -name user_id port 2>1 1>$home_`date` &
I am a newbie to shell, Kindly please help (3 Replies)
Discussion started by: Suganbabu
3 Replies
LEARN ABOUT CENTOS
tk::label
Label(3) User Contributed Perl Documentation Label(3)NAME
Tk::Label - Create and manipulate Label widgets
SYNOPSIS
$label = $parent->Label(?options?);
STANDARD OPTIONS -activebackground -activeforeground -anchor -background -bitmap -borderwidth -compound -cursor -disabledforeground -font -foreground
-highlightbackground -highlightcolor -highlightthickness -image -justify -padx -pady -relief -takefocus -text -textvariable -underline
-wraplength
See Tk::options for details of the standard options.
WIDGET-SPECIFIC OPTIONS
Name: height
Class: Height
Switch: -height
Specifies a desired height for the label. If an image or bitmap is being displayed in the label then the value is in screen units
(i.e. any of the forms acceptable to Tk_GetPixels); for text it is in lines of text. If this option isn't specified, the label's
desired height is computed from the size of the image or bitmap or text being displayed in it.
Name: state
Class: State
Switch: -state
Specifies one of three states for the label: normal, active, or disabled. In normal state the label is displayed using the foreground
and background options. In active state the label is displayed using the activeForeground and activeBackground options. In the disabled
state the disabledForeground and background options determine how the button is displayed.
Name: width
Class: Width
Switch: -width
Specifies a desired width for the label. If an image or bitmap is being displayed in the label then the value is in screen units (i.e.
any of the forms acceptable to Tk_GetPixels); for text it is in characters. If this option isn't specified, the label's desired width
is computed from the size of the image or bitmap or text being displayed in it.
DESCRIPTION
The Label method creates a new window (given by the $widget argument) and makes it into a label widget. Additional options, described
above, may be specified on the command line or in the option database to configure aspects of the label such as its colors, font, text, and
initial relief. The label command returns its $widget argument. At the time this command is invoked, there must not exist a window named
$widget, but $widget's parent must exist.
A label is a widget that displays a textual string, bitmap or image. If text is displayed, it must all be in a single font, but it can
occupy multiple lines on the screen (if it contains newlines or if wrapping occurs because of the wrapLength option) and one of the
characters may optionally be underlined using the underline option. The label can be manipulated in a few simple ways, such as changing
its relief or text, using the commands described below.
WIDGET METHODS
The Label method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used
to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.
BINDINGS
When a new label is created, it has no default event bindings: labels are not intended to be interactive.
KEYWORDS
label, widget
perl v5.16.3 2014-06-10 Label(3)