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

hello i'm using tk to design a gui based program for people to use for data entry they enter data using either buttons on the gui or the keyboard i'm using an entry widget to take the data they are entering (so they can click on with the mouse and edit if they typed in wrong) my problem is that i want the box containg they entry to be big (and big letters in so its easy to read) and i can't seem to resise the entry box vertically you can use fill=>x to resize it horizontally but fill=>y and fill=>both don't stretch the box vertically i figured maybe i needed to set the font option but can't get the relavent web page in the documentaton any help greatfully appreciated

Replies are listed 'Best First'.
Re: TK entry widget
by polettix (Vicar) on Apr 26, 2005 at 10:06 UTC
    Wow, reading your post left me without breath! If you want to post-edit your questions/answers to make corrections, you can register - I suggest as "JamesJoyce" (it's free, I've checked) or "StreamOfConsciousness" ;D

    Back to business, I've never used Perl/Tk other than for trying it, but I've seen that googling a bit shouldn't be that bad; in particular, this and this seem interesting.

    BTW, my search keys were "perl/tk set font", and I tried them in the Super Search as well. There is an interesting post that should be both funny and instructive for your case: A Perl/Tk version of the 3-card trick.

    Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

    Don't fool yourself.
Re: TK entry widget
by zentara (Cardinal) on Apr 26, 2005 at 11:54 UTC
    "Stream of Conciousness" :-) You can use rambling English here, if you show some code demonstrating your problem. I think what you want to do is specify a font size. Check out Tk::FontDialog.
    #!/usr/bin/perl use warnings; use strict; use Tk; my $mw = new MainWindow; $mw->fontCreate('big', -family=>'courier', -weight=>'bold', -size=>int(-18*18/14)); $mw->fontCreate('medium', -family=>'courier', -weight=>'bold', -size=>int(-14*14/10)); my $entry = $mw->Entry(-font =>'big', -text=>'Big')->pack(); my $entry1 = $mw->Entry(-font medium', -text=>'Big')->pack(); MainLoop;

    I'm not really a human, but I play one on earth. flash japh
Re: TK entry widget
by Anonymous Monk on Apr 26, 2005 at 09:35 UTC
    sorry what i should have been saying is fill => both does work but i had my frames set out wrong! oops still if anyone knows where to fingd the documetation on fonts