Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: how to align the label and entry text box in my tk GUI

by kcott (Archbishop)
on Mar 20, 2017 at 07:46 UTC ( [id://1185226]=note: print w/replies, xml ) Need Help??


in reply to how to align the label and entry text box in my tk GUI

G'day fsmendoza,

I've always found that Tk::grid, rather than Tk::pack, is the better geometry manager for this task.

I would, however, advise that you lay out your GUI with frames (Tk::Frame, or even Tk::LabFrame) using pack. Then, within whichever frame(s) you want for your label and entry widgets, use grid.

You should also aim to avoid a monolithic script with all variables having file-scope: not doing so leads to all the same problems experienced with global variables. You're already using lexical variables, which is good; limit their scope within subroutines, anonymous blocks, or similar constructs.

— Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1185226]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-04-19 16:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found