|
From: Johan L. <jo...@ba...> - 2002-01-20 19:43:33
|
Haven't seen any response to this one yet so here goes...
At 16:19 2002-01-18 -0800, ed wrote:
>I want to put a label on my window after the user
>opens up a file to edit.
>It's a long string of text, it's the full path to the
>file.
>The label displays, but if it's too long it just runs
>until it gets cut off
>by the right border of the main window.
>I've been searching docs and email archives and can't
>seem to find the solution.
>I don't know if it matters, but I add the label from
>the sub that handles the opening
>of the file.
Two things.
First, I would suggest you build the entire window at once (including the
Label for the path), then you can modify the contents as you go along. Do
that like this:
$main->current_file_label()->Text("Currently editing file: $OPENED_FILE . ")
Second, I think your problem is that you assign the label a location, but
not a size. So although you have correctly set the option -wrap => 1, maybe
the label itself runs off the edge of the window. Set the label -width and
-height options as well.
/J
-------- ------ ---- --- -- -- -- - - - - -
Johan Lindström Sourcerer @ Boss Casinos jo...@ba...
Latest bookmark: "What does efficient mean!"
<http://www.perlmonks.org/index.pl?node_id=138919&lastnode_id=140162>
|