<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://mars.merhot.dk/w/index.php?action=history&amp;feed=atom&amp;title=Perl_TK_eksempel</id>
		<title>Perl TK eksempel - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://mars.merhot.dk/w/index.php?action=history&amp;feed=atom&amp;title=Perl_TK_eksempel"/>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Perl_TK_eksempel&amp;action=history"/>
		<updated>2026-05-12T20:30:07Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.0</generator>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Perl_TK_eksempel&amp;diff=10965&amp;oldid=prev</id>
		<title>Heth: /* Eksempel 3 */</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Perl_TK_eksempel&amp;diff=10965&amp;oldid=prev"/>
				<updated>2010-02-07T17:08:31Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Eksempel 3&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 17:08, 7 February 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l469&quot; &gt;Line 469:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 469:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ($x1b,$y1b) =&amp;#160; $cv-&amp;gt;coords($xunits[$i]);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ($x1b,$y1b) =&amp;#160; $cv-&amp;gt;coords($xunits[$i]);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if ( $x1b &amp;lt; 50 ) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if ( $x1b &amp;lt; 50 ) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; $cv-&amp;gt;itemconfigure($xunits[$i], -text =&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/del&gt;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; $cv-&amp;gt;itemconfigure($xunits[$i], -text =&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&amp;quot;&lt;/ins&gt;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; } if ( $x1b &amp;lt;= -50 ) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; } if ( $x1b &amp;lt;= -50 ) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;  $x1b = $cvW-50;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;  $x1b = $cvW-50;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Heth</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Perl_TK_eksempel&amp;diff=9947&amp;oldid=prev</id>
		<title>Heth: /* Eksempel 2 */</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Perl_TK_eksempel&amp;diff=9947&amp;oldid=prev"/>
				<updated>2009-11-13T08:02:31Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Eksempel 2&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;a href=&quot;http://mars.merhot.dk/w/index.php?title=Perl_TK_eksempel&amp;amp;diff=9947&amp;amp;oldid=9946&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Heth</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Perl_TK_eksempel&amp;diff=9946&amp;oldid=prev</id>
		<title>Heth at 06:52, 13 November 2009</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Perl_TK_eksempel&amp;diff=9946&amp;oldid=prev"/>
				<updated>2009-11-13T06:52:35Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 06:52, 13 November 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= Eksempel 1 =&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;source lang=perl&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;#!/usr/local/bin/perl&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;use Tk;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# Main Window&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;$mw = new MainWindow;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;my $lab = $mw -&amp;gt; Label(-text=&amp;gt;&amp;quot;This is the root window.&amp;quot;,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		-font=&amp;gt;&amp;quot;ansi 12 bold&amp;quot;) -&amp;gt; pack;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;my $but = $mw -&amp;gt; Button(-text=&amp;gt;&amp;quot;Click to Create Toplevel&amp;quot;,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		-command=&amp;gt;\&amp;amp;makeTop)&amp;#160; -&amp;gt; pack;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;MainLoop;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;#A function to make a toplevel window&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sub makeTop {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	my $top = $mw -&amp;gt; Toplevel(); #Make the window&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	#Put things in it&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	my $top_lab = $top -&amp;gt; Label(-text=&amp;gt;&amp;quot;This is the Toplevel window.&amp;quot;,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;			-font=&amp;gt;&amp;quot;ansi 12 bold&amp;quot;) -&amp;gt; pack;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	my $txt = $top -&amp;gt; Text() -&amp;gt; pack;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	$txt -&amp;gt; insert('end', &amp;quot;Widgets can be packed in this window.&amp;quot;);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	#An option to close the window.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	my $but_close = $top -&amp;gt; Button(-text=&amp;gt;&amp;quot;Close&amp;quot;,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		-command =&amp;gt; sub { destroy $top; } ) -&amp;gt; pack;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/source&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= Eksempel 2 =&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=perl&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=perl&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#!/usr/bin/perl -w&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#!/usr/bin/perl -w&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Heth</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Perl_TK_eksempel&amp;diff=9945&amp;oldid=prev</id>
		<title>Heth at 06:18, 13 November 2009</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Perl_TK_eksempel&amp;diff=9945&amp;oldid=prev"/>
				<updated>2009-11-13T06:18:34Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 06:18, 13 November 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l102&quot; &gt;Line 102:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 102:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$help -&amp;gt; command(-label =&amp;gt;&amp;quot;About&amp;quot;, -command =&amp;gt; sub {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$help -&amp;gt; command(-label =&amp;gt;&amp;quot;About&amp;quot;, -command =&amp;gt; sub {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	$txt-&amp;gt;delete('1.0','end');&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	$txt-&amp;gt;delete('1.0','end');&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	$txt-&amp;gt;insert('end',&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;EUC MIDT &lt;/del&gt;- Tk Perl eksempel 1 /HeTh\n&amp;quot;)});&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	$txt-&amp;gt;insert('end',&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Mercantec &lt;/ins&gt;- Tk Perl eksempel 1 /HeTh\n&amp;quot;)});&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Heth</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Perl_TK_eksempel&amp;diff=9944&amp;oldid=prev</id>
		<title>Heth: New page: &lt;source lang=perl&gt; #!/usr/bin/perl -w  use strict; use warnings;  use Tk; use Net::Ping;  # Main window oprettes my $i=0; our $BstartTimer; my $s2; my @hosts = (&quot;4.2.2.2&quot;, &quot;www.jp.dk&quot;); my...</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Perl_TK_eksempel&amp;diff=9944&amp;oldid=prev"/>
				<updated>2009-11-13T06:17:52Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &amp;lt;source lang=perl&amp;gt; #!/usr/bin/perl -w  use strict; use warnings;  use Tk; use Net::Ping;  # Main window oprettes my $i=0; our $BstartTimer; my $s2; my @hosts = (&amp;quot;4.2.2.2&amp;quot;, &amp;quot;www.jp.dk&amp;quot;); my...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=perl&amp;gt;&lt;br /&gt;
#!/usr/bin/perl -w&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
use warnings;&lt;br /&gt;
&lt;br /&gt;
use Tk;&lt;br /&gt;
use Net::Ping;&lt;br /&gt;
&lt;br /&gt;
# Main window oprettes&lt;br /&gt;
my $i=0;&lt;br /&gt;
our $BstartTimer;&lt;br /&gt;
my $s2;&lt;br /&gt;
my @hosts = (&amp;quot;4.2.2.2&amp;quot;, &amp;quot;www.jp.dk&amp;quot;);&lt;br /&gt;
my $pingCount=0;&lt;br /&gt;
my $tv = &amp;quot;Running..&amp;quot;;&lt;br /&gt;
my $mw = new MainWindow();&lt;br /&gt;
&lt;br /&gt;
$mw-&amp;gt;title(&amp;quot;TK Perl menu eksempel 1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Knapper&lt;br /&gt;
my $Lstart = $mw-&amp;gt;Label(-text =&amp;gt; 'Pingtest  ');&lt;br /&gt;
my $Bstart = $mw -&amp;gt; Button(-text =&amp;gt; &amp;quot;Start&amp;quot;, -command =&amp;gt;\&amp;amp;Bstart,&lt;br /&gt;
                   -overrelief =&amp;gt; 'sunken', -relief =&amp;gt; 'raised',-padx =&amp;gt; 20);&lt;br /&gt;
my $Bstop = $mw -&amp;gt; Button(-text =&amp;gt; &amp;quot;Stop &amp;quot;, -command =&amp;gt;\&amp;amp;Bstop,&lt;br /&gt;
                   -overrelief =&amp;gt; 'sunken', -relief =&amp;gt; 'raised',&lt;br /&gt;
                   -padx =&amp;gt; 20,-state =&amp;gt; 'disabled');&lt;br /&gt;
#Status felt&lt;br /&gt;
my $status = $mw -&amp;gt; Label (&lt;br /&gt;
                -relief =&amp;gt; 'flat' ,&lt;br /&gt;
                -borderwidth =&amp;gt; 2 ,&lt;br /&gt;
                -height =&amp;gt; 1 ,&lt;br /&gt;
                -width =&amp;gt; 40 ,&lt;br /&gt;
                -justify =&amp;gt; 'right' ,&lt;br /&gt;
                -anchor =&amp;gt; 'w',&lt;br /&gt;
                -textvariable =&amp;gt; \$tv );&lt;br /&gt;
my $c = &amp;quot; --:--:--&amp;quot;;&lt;br /&gt;
my $c2=0;&lt;br /&gt;
my $clk = $mw -&amp;gt; Label (&lt;br /&gt;
                -relief =&amp;gt; 'ridge' ,&lt;br /&gt;
                -borderwidth =&amp;gt; 1 ,&lt;br /&gt;
                -height =&amp;gt; 1 ,&lt;br /&gt;
                -width =&amp;gt;10 ,&lt;br /&gt;
                -justify =&amp;gt; 'left' ,&lt;br /&gt;
                -textvariable =&amp;gt; \$c );&lt;br /&gt;
&lt;br /&gt;
$clk-&amp;gt;repeat(500,\&amp;amp;mintid);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Når er trykkes på F2 køres subrutinen menuclicked()&lt;br /&gt;
$mw-&amp;gt;bind ( &amp;quot;&amp;lt;F2&amp;gt;&amp;quot; , \&amp;amp;menuClicked ) ;&lt;br /&gt;
&lt;br /&gt;
# Når er trykkes på F3 køres subrutinen saveclicked()&lt;br /&gt;
$mw-&amp;gt;bind ( &amp;quot;&amp;lt;F3&amp;gt;&amp;quot; , \&amp;amp;saveClicked ) ;&lt;br /&gt;
&lt;br /&gt;
#MOpret et scrool-bart tekstområde i $mv (Hoved vindue)&lt;br /&gt;
my $txt = $mw-&amp;gt;Scrolled('Text',-height =&amp;gt; 20,-width =&amp;gt; 50,&lt;br /&gt;
                        -scrollbars=&amp;gt;'osoe', -wrap =&amp;gt; 'none');&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Opret en menubar i objktet&lt;br /&gt;
my $mbar = $mw-&amp;gt;Menu();&lt;br /&gt;
$mw-&amp;gt;configure(-menu =&amp;gt; $mbar);&lt;br /&gt;
&lt;br /&gt;
#Hovedenmer i menuen&lt;br /&gt;
my $file    = $mbar-&amp;gt;cascade(-label=&amp;gt;&amp;quot;File&amp;quot;, -underline=&amp;gt;0, -tearoff =&amp;gt; 0);&lt;br /&gt;
my $edit    = $mbar-&amp;gt;cascade(-label=&amp;gt;&amp;quot;Edit&amp;quot;, -underline=&amp;gt;0, -tearoff =&amp;gt; 0);&lt;br /&gt;
my $devices = $mbar-&amp;gt;cascade(-label =&amp;gt;&amp;quot;Enheder&amp;quot;, -underline=&amp;gt;0, -tearoff =&amp;gt; 0);&lt;br /&gt;
my $help    = $mbar-&amp;gt;cascade(-label =&amp;gt;&amp;quot;Help&amp;quot;, -underline=&amp;gt;0, -tearoff =&amp;gt; 0);&lt;br /&gt;
&lt;br /&gt;
## File Menu ##&lt;br /&gt;
$file -&amp;gt; command(-label =&amp;gt; &amp;quot;New&amp;quot;, -underline=&amp;gt;0,&lt;br /&gt;
		-command=&amp;gt;sub { $txt -&amp;gt; delete('1.0','end');} );&lt;br /&gt;
$file -&amp;gt; checkbutton(-label =&amp;gt;&amp;quot;Open&amp;quot;, -underline =&amp;gt; 0,&lt;br /&gt;
		-command =&amp;gt; [\&amp;amp;menuClicked, &amp;quot;Open&amp;quot;],&lt;br /&gt;
                -accelerator =&amp;gt; &amp;quot;F2&amp;quot;);&lt;br /&gt;
$file -&amp;gt; command(-label =&amp;gt;&amp;quot;Status&amp;quot;, -underline =&amp;gt; 0,&lt;br /&gt;
		-command =&amp;gt; [\&amp;amp;saveClicked, &amp;quot;Status&amp;quot;],&lt;br /&gt;
                -accelerator =&amp;gt; &amp;quot;F3&amp;quot;);&lt;br /&gt;
$file -&amp;gt; separator();&lt;br /&gt;
$file -&amp;gt; command(-label =&amp;gt;&amp;quot;Exit&amp;quot;, -underline =&amp;gt; 1,&lt;br /&gt;
		-command =&amp;gt; sub { exit } );&lt;br /&gt;
&lt;br /&gt;
## Enheder Menu ##&lt;br /&gt;
my $cisco = $devices -&amp;gt; cascade(-label =&amp;gt;&amp;quot;Cisco udstyr&amp;quot;,&lt;br /&gt;
	 -underline =&amp;gt; 0, -tearoff =&amp;gt; 0);&lt;br /&gt;
$cisco -&amp;gt; command(-label =&amp;gt;&amp;quot;Opret enhed&amp;quot;,&lt;br /&gt;
	-command =&amp;gt; sub { $txt-&amp;gt;insert('end',&lt;br /&gt;
        &amp;quot;Der oprettes en ny Cisco Router :-)\n&amp;quot;);});&lt;br /&gt;
$cisco -&amp;gt; command(-label =&amp;gt;&amp;quot;Rediger enhed&amp;quot;, -command=&amp;gt;sub {&lt;br /&gt;
	$txt-&amp;gt;insert('end',&amp;quot;Cisco enhed redigeres\n&amp;quot;);});&lt;br /&gt;
&lt;br /&gt;
$cisco -&amp;gt; command(-label =&amp;gt;&amp;quot;Slet enhed&amp;quot;,&lt;br /&gt;
	-command=&amp;gt; sub {$txt-&amp;gt;insert('end',&amp;quot;Er du nu helt sikker?\n&amp;quot;);});&lt;br /&gt;
$devices -&amp;gt; command(-label =&amp;gt;&amp;quot;Ping enhed&amp;quot;, -underline =&amp;gt; 7,&lt;br /&gt;
	-command =&amp;gt; sub { $txt-&amp;gt;insert('end',&amp;quot;Ja her burde der pinges\n&amp;quot;);});&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## Help ##&lt;br /&gt;
$help -&amp;gt; command(-label =&amp;gt;&amp;quot;About&amp;quot;, -command =&amp;gt; sub {&lt;br /&gt;
	$txt-&amp;gt;delete('1.0','end');&lt;br /&gt;
	$txt-&amp;gt;insert('end',&amp;quot;EUC MIDT - Tk Perl eksempel 1 /HeTh\n&amp;quot;)});&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
### Pack windows&lt;br /&gt;
$Lstart-&amp;gt;grid(-row=&amp;gt;0,-column=&amp;gt;0,-sticky=&amp;gt;'e',-in =&amp;gt; $mw);&lt;br /&gt;
$Bstart-&amp;gt;grid(-row=&amp;gt;0,-column=&amp;gt;1,-sticky=&amp;gt;'e',-in =&amp;gt; $mw);&lt;br /&gt;
$Bstop-&amp;gt;grid(-row=&amp;gt;0,-column=&amp;gt;2,-sticky=&amp;gt;'e',-in =&amp;gt; $mw);&lt;br /&gt;
$status-&amp;gt;grid(-row=&amp;gt;2,-column=&amp;gt;0,-sticky=&amp;gt;&amp;quot;w&amp;quot;,-in =&amp;gt; $mw);&lt;br /&gt;
$clk-&amp;gt;grid(-row=&amp;gt;2,-column=&amp;gt;2,-sticky=&amp;gt;&amp;quot;e&amp;quot;,-in =&amp;gt; $mw);&lt;br /&gt;
$txt-&amp;gt;grid(-row=&amp;gt;1,-column=&amp;gt;0,-in =&amp;gt; $mw,-columnspan =&amp;gt; 3,-sticky=&amp;gt;'ewns');&lt;br /&gt;
}&lt;br /&gt;
### resize behaviour&lt;br /&gt;
$mw-&amp;gt;gridRowconfigure (0,-weight =&amp;gt; 0);&lt;br /&gt;
$mw-&amp;gt;gridRowconfigure (1,-weight =&amp;gt; 1);&lt;br /&gt;
$mw-&amp;gt;gridRowconfigure (2,-weight =&amp;gt; 0);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$mw-&amp;gt;gridColumnconfigure (0,-weight =&amp;gt; 1);&lt;br /&gt;
$mw-&amp;gt;gridColumnconfigure (1,-weight =&amp;gt; 0);&lt;br /&gt;
&lt;br /&gt;
MainLoop;&lt;br /&gt;
&lt;br /&gt;
sub Bstart {&lt;br /&gt;
    $tv=&amp;quot;Pingtest starter..&amp;quot;;&lt;br /&gt;
    $Bstop-&amp;gt;configure(-state=&amp;gt;'normal');&lt;br /&gt;
    $Bstart-&amp;gt;configure(-state=&amp;gt;'disabled');&lt;br /&gt;
 $txt-&amp;gt;insert('end',&amp;quot;............Starter pingtest.\n&amp;quot;);&lt;br /&gt;
 $BstartTimer = $txt-&amp;gt;repeat(500,\&amp;amp;MyPing);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub Bstop {&lt;br /&gt;
    $tv=&amp;quot;Pingtest afsluttet. Der er ialt kørt $pingCount forløb.&amp;quot;;&lt;br /&gt;
    $Bstart-&amp;gt;configure(-state=&amp;gt;'normal');&lt;br /&gt;
    $Bstop-&amp;gt;configure(-state=&amp;gt;'disabled');&lt;br /&gt;
 $txt-&amp;gt;insert('end',&amp;quot;............Stopper pingtest.\n&amp;quot;);&lt;br /&gt;
 $BstartTimer-&amp;gt;cancel();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub menuClicked {&lt;br /&gt;
	my ($opt) = @_;&lt;br /&gt;
	$mw-&amp;gt;messageBox(-message =&amp;gt; &amp;quot;Det er en vigtig besked&amp;quot;,&lt;br /&gt;
                        -title =&amp;gt; &amp;quot;Advarsel&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
sub saveClicked {&lt;br /&gt;
    my ($opt) = @_;&lt;br /&gt;
&lt;br /&gt;
$i++;&lt;br /&gt;
$tv = &amp;quot;Nu er der klikket $i gange&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
sub mintid {&lt;br /&gt;
  my @mon_abbr =&lt;br /&gt;
      qw( Jan Feb Mar Apr Maj Jun Jul Aug Sep Okt Nov Dec );&lt;br /&gt;
&lt;br /&gt;
  my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);&lt;br /&gt;
  if ($c2 == 0) {&lt;br /&gt;
	$c = sprintf(&amp;quot; %02i:%02i:%02i &amp;quot;, $hour, $min, $sec );&lt;br /&gt;
        $c2 = 1;&lt;br /&gt;
  } else {&lt;br /&gt;
	$c = sprintf(&amp;quot; %02i %02i %02i &amp;quot;, $hour, $min, $sec );&lt;br /&gt;
        $c2 = 0;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sub MyPing {&lt;br /&gt;
  my $protocol = 'icmp';&lt;br /&gt;
  my $p;&lt;br /&gt;
  my $host;&lt;br /&gt;
&lt;br /&gt;
  $pingCount++;&lt;br /&gt;
  $tv=&amp;quot;Ping test kører $pingCount forløb.&amp;quot;;&lt;br /&gt;
  $txt-&amp;gt;insert('end', &amp;quot;$pingCount: &amp;quot;);&lt;br /&gt;
  foreach $host (@hosts) {&lt;br /&gt;
    $p = Net::Ping-&amp;gt;new($protocol,1);&lt;br /&gt;
&lt;br /&gt;
    if ( $p-&amp;gt;ping($host) ) {&lt;br /&gt;
       $txt-&amp;gt;insert('end', &amp;quot;$host \($protocol\) er oppe &amp;quot;);&lt;br /&gt;
    } else {&lt;br /&gt;
       $txt-&amp;gt;insert('end', &amp;quot;$host \($protocol\) er nede &amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    $p-&amp;gt;close();&lt;br /&gt;
  }&lt;br /&gt;
  $txt-&amp;gt;insert('end',&amp;quot;\n&amp;quot;);&lt;br /&gt;
  $txt-&amp;gt;see('end');&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
[[category:Perl]]&lt;/div&gt;</summary>
		<author><name>Heth</name></author>	</entry>

	</feed>