programming-examples/perl/GUI/Insert bold text to a Text widget.pl

11 lines
288 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/local/bin/perl -w
use Tk;
use strict;
my $mw = MainWindow->new;
my $t = $mw->Text()->pack();
$t->tagConfigure('bold', -font => "{Courier New} 24 {bold}");
$t->insert('end', "This is some normal text\n");
$t->insert('end', "This is some bold text\n", 'bold');
MainLoop;