FM has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,
I moved my code from a destktop to a laptop and when I run the application, some elements are running into each other. I have fixed the size of the window (minsize) and I place all the widgets in it except for the notebook. Here is the beginning of my code:
my $mw=MainWindow->new(); $mw->minsize(qw(545 470));
Then, the widgets are created:
my $notebook=$mw->NoteBook(-font=>"Helvetica 12")->pack(-expand => 1, +-fill => 'both'); my $page1=$notebook->add('page1', -label=>'Case Information'); my $generall=$page1->Label(-text=>'GENERAL INFORMATION', -font=>"Times + 12")->place(-x=>160, -y=>2);
Any idea of what is going on?
Thanks for letting me know!
FM

Replies are listed 'Best First'.
Re: displaying Tk widgets
by rcseege (Pilgrim) on Oct 29, 2005 at 00:17 UTC

    Is there a particular reason you've chosen to use the place geometry manager? It might seem that absolute placement is a Good Thing, however it ends up causing more problems than it solves. This includes dealing well with different fonts, resolutions, etc.

    I've found that there's very little I can't accomplish by sticking with either pack or grid, or layouts that use a combination of both (group of gridded widgets within a frame that is packed with other widgets, for example).

    Rob
Re: displaying Tk widgets
by zentara (Cardinal) on Oct 28, 2005 at 19:16 UTC
    Try smaller fonts, or even comment out the -font lines to use the default.

    I'm not really a human, but I play one on earth. flash japh
      further re Zentara's:

      Your notebook may well run with a different (higher) resolution than your desktop machine. In that case, fixing font sizes in the manner you've used can be problematic, if the width of the widgets is fixed.

        How would I check on the resolution? And how could I change it?
        The first thing I did was try to change the screen resolution so it might fix it, but it did not work!
        Thanks again,
        FM