i want to highlight(select) text field in a text area in perl.is there any way to that
any help..........
10 3360
perl has no "text area". Can you explain your question better?
perl has no "text area". Can you explain your question better?
i mean text box.i have made a text box using perl tk.i want to select some text inside the text box.how i do that.
thanks brother
i mean text box.i have made a text box using perl tk.i want to select some text inside the text box.how i do that.
thanks brother
Using tag method, set a background color first. You can use this color to highlight text later. E.g -
my $tx= $fr->Scrolled( 'Text', '-scrollbars' => 'e', '-background' => 'white',
-
)->pack( -fill => 'both', -expand => 1, -side => 'bottom' );
-
-
$tx->tag(qw/configure color1 -background yellow/); ##yellow for highlight
-
$tx->insert('insert', "This is ");
-
$tx->insert('insert',"highlighted text",'color1');
-
$tx->insert('insert', "\n ");
-
-Nithin
thanks very much.i'm sorry.i've illustrate the question wrongly.
when i click the relevant text inside the text box it should select.when i click the text it should come another window that describes the properties of that text.that is the my question.if you don't understand pls tell me.i will explain.
thanks .cheers
I dont understand what you want exatly ,but I give u 2 tips, I hope that help u
u can select a text widget in TK(set the cursor in this widget): - use Tk;
-
$mw->maxsize(500,800);
-
$mw->minsize(500,800);
-
$text=$mw->Text( -width=>65,
-
-height=>5,
-
);
-
$text->place(-x => 20,-y => 700);
-
$text->focus; #set cursor to the chosen text widget
When u want take a line from text widget do this: - use Tk;
-
$mw->maxsize(500,800);
-
$mw->minsize(500,800);
-
$text=$mw->Text( -width=>65,
-
-height=>5,
-
);
-
$text->place(-x => 20,-y => 700);
-
#then u write to text widget
-
$r=$text->get('1.0','1.0 lineend'); #take the first line from text
u can also many line take(u think that field?) - @r=$text->get(’1.0’,’1.0 lineend’,’2.0’,’2.0 lineend’);
-
#this get first second... lines from your text widget
results:
$r[0]="first line"
$r[1]="second line"
ect.
thanks brother.i think u ve not understand my problem.
in my text box it is displayed some mac addresses as follows.
0x001cc48468c2
0x001635749100
0x00219bd81383
0x000bcd5f295c
0x000c29a59daa
when i double click on one of mac address then i want to pop up a new window.but i don t know is it possible in perl tk.
how i do that
thanks again............
thanks brother.i think u ve not understand my problem.
in my text box it is displayed some mac addresses as follows.
0x001cc48468c2
0x001635749100
0x00219bd81383
0x000bcd5f295c
0x000c29a59daa
when i double click on one of mac address then i want to pop up a new window.but i don t know is it possible in perl tk.
how i do that
thanks again............
Why dont make a browseentry? In that can u chose a line and to assign a subrutin.
ye it's also helped me.but i want is when i click on one mac address then it should come a new window.how i do that.i'm new to the perl.
any help greatly appreciated.........
ye it's also helped me.but i want is when i click on one mac address then it should come a new window.how i do that.i'm new to the perl.
any help greatly appreciated.........
- use Tk;
-
$mw = MainWindow->new(-title => " Using BrowseEntry");
-
$be = $mw->BrowseEntry(-variable => \$string,
-
-browsecmd => \&rutin);
-
$be->pack();
-
MainLoop();
-
sub rutin
-
{
-
$mw2 = MainWindow->new(-title => " New MainWindow");
-
}
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Cues Plus |
last post by:
Hello,
I have a simple form text area for people to add comments in. The problem is
that using the standard
<TEXT AREA NAME="comments" ROWS=4 COLS=35></TEXT AREA>
Allows people to put in...
|
by: who be dat? |
last post by:
I'm trying to make a webpage do the following:
I want a user to be able to click on a given image (there will be more than
one image). Upon clicking a given image, characters specific to that...
|
by: Bhupesh Naik |
last post by:
This is a query regarding my problem to make a spell and
grammar check possible in text area of a web page.
We have aspx pages which are used to construct letters.
The browser based screens...
|
by: Jake Barnes |
last post by:
This weekend I wanted to learn AJAX, so I set up a little toy page
where I could experiment. The idea of this page is that you click in
one of the boxes to get some controls, at which point you can...
|
by: divya |
last post by:
I have a form which has a textarea,name - txtTo where he adds email
addresses.Now when he clicks on sendemail I want to open a mailto link
with addresses taken from textarea.
Example
I added...
|
by: RateTheBuilder |
last post by:
Hi
I found the below scripts which are used to dynamically resize the height of
the text area input control. The site I found it on www.webdeveloper.com had
it being called with the following...
|
by: veinnz |
last post by:
hi all...
i'm kinda newbie in php...so i would like to ask ur guidance on how to compare the distribution of whitespace between two text area?
so let's say
text area 1 i type : hi how are you...
|
by: David Stone |
last post by:
I have a simple question about the alt content of area elements
within an image map: is it redundant to include phrases such as
"link to..." or "jump to..."? My initial thought is 'yes', since...
|
by: pradeeps |
last post by:
i have array with values.i want to insert this array into text area one per line.up to now my code is............
my @res=;
my $tx->insert('end', @res);
text area display this result in same...
|
by: phpmagesh |
last post by:
Hi All,
I have problem in the html page
I have flash banner at the top of the page and i have menu in the same flash. this flash will cover the content area. so to access content area i used...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |