Schrift
[thread]4685[/thread]

Menü mit Icons und Editbox (Seite 2)



<< |< 1 2 >| >> 11 Einträge, 2 Seiten
Crian
 2003-12-02 12:38
#46134 #46134
User since
2003-08-04
5873 Artikel
ModeratorIn
[Homepage]
user image
Das tuts bei mir auch :)

Ich hab den Code noch "optisch" etwas verschönert:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/local/bin/perl
use strict;
use warnings;

use Tk;
use Tk::Compound;

my $mw = MainWindow->new;

my $b  = $mw->Button(-command => sub { $mw->destroy() },
                   )
             ->pack(-expand  => 1,
                    -fill    => 'x',
                   );

my $i  = $b->Compound;
$i->Line;
$i->Text(-text => 'Line');
$i->Space(-width => '3m');
$i->Text(-text => 'one');
$i->Line;
$i->Bitmap(-bitmap => 'warning');
$i->Line;
$i->Text(-text => 'Line2');

$b->configure(-image => $i);

my $b2 = $mw->Button(-command => sub { $mw->destroy() },
                    -image   => $i,
                   )
             ->pack(-expand  => 1,
                    -fill    => 'x',
                   );

MainLoop();


:)

Edit: Leerstellenfraß des Code-Tags nachbearbeitet *augenroll*\n\n

<!--EDIT|Crian|1070361543-->
s--Pevna-;s.([a-z]).chr((ord($1)-84)%26+97).gee; s^([A-Z])^chr((ord($1)-52)%26+65)^gee;print;

use strict; use warnings; Link zu meiner Perlseite
<< |< 1 2 >| >> 11 Einträge, 2 Seiten



View all threads created 2003-12-01 11:34.