merrymonk has asked for the wisdom of the Perl Monks concerning the following question:
I want to display a list in the dialog that varies in length. I thought I would create this list in a variable with a line feed after each item as shown next$mw_text->add('Label', -text => $label_str)->pack;
I want to show the list in a text box of the dialog box. I tried the followingforeach $text_item (@$ref_text_array) { chomp($text_item); $text_str .= $text_item . "\n"; }
However this failed. It did not like –scrollbars (but I wanted them in case the list got too long) It did not like –text (and –textvariable) I have tried to find suitable examples on the internet but this failed! What should I do?$mw_text->add('Text', -scrollbars => "e", -width => 80, -height => 35, -text => $text_str )->pack();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Adding 'text' to a Tk DialogBox
by thundergnat (Deacon) on Feb 12, 2008 at 18:18 UTC | |
by merrymonk (Hermit) on Feb 13, 2008 at 09:27 UTC |