Debian Codegraph @

examples/gridbug

raw
1 #!/usr/local/bin/perl -w
2 use Tk;
3 use Carp;
4 $top = MainWindow->new();
5 $top->title("STest23289 test");
6
7 $SIG{'__DIE__'} = \&confess;
8
9 # interface generated by SpecTcl version 1.0 from STest21872.ui
10 # Experimental pTk version using the gridbag geometry manager
11
12 sub STest23289_ui {
13 my($root) = @_;
14
15 # $root->grid; # stolen from npuz but does not help here
16
17 my($text_1) = $root->Text (
18 -background => '#d9d9d9',
19 -cursor => undef,
20 -foreground => 'Black',
21 -height => '1',
22 -highlightbackground => '#d9d9d9',
23 -width => '1'
24 );
25 my($listbox_1) = $root->Listbox (
26 -background => '#d9d9d9',
27 -foreground => 'Black',
28 -height => '0',
29 -highlightbackground => '#d9d9d9',
30 -width => '0'
31 );
32 my($message_1) = $root->Message (
33 -background => '#d9d9d9',
34 -foreground => 'Black',
35 -highlightbackground => '#d9d9d9',
36 -text => 'message'
37 );
38
39 # Geometry management
40
41 $text_1->grid(
42 -in => $root,
43 -column => '2',
44 -row => '1',
45 -sticky => 'nesw'
46 );
47
48 $listbox_1->grid(
49 -in => $root,
50 -column => '1',
51 -row => '2',
52 -sticky => 'nesw'
53 );
54
55 $message_1->grid(
56 -in => $root,
57 -column => '2',
58 -row => '3'
59 );
60
61 # Resize behavior management
62
63 $root->gridRowconfigure(1, -weight => 0, -minsize => 30);
64 $root->gridRowconfigure(2, -weight => 0, -minsize => 30);
65 $root->gridRowconfigure(3, -weight => 0, -minsize => 30);
66 $root->gridColumnconfigure(1, -weight => 0, -minsize => 30);
67 $root->gridColumnconfigure(2, -weight => 0, -minsize => 30);
68 }
69 STest23289_ui $top;
70 Tk::MainLoop;
71
72