Tcl Tutorial
Tk Tutorial
Tcl/Tk Useful Resources
Selected Reading
- Tcl - Regular Expressions
- Tcl - Built-in Functions
- Tcl - Error Handling
- Tcl - File I/O
- Tcl - Namespaces
- Tcl - Packages
- Tcl - Procedures
- Tcl - Dictionary
- Tcl - Lists
- Tcl - Strings
- Tcl - Arrays
- Tcl - Loops
- Tcl - Decisions
- Tcl - Operators
- Tcl - Variables
- Tcl - Data Types
- Tcl - Commands
- Tcl - Basic Syntax
- Tcl - Special Variables
- Tcl - Environment Setup
- Tcl - Overview
- Tcl - Home
Tk Tutorial
- Tk - Geometry Manager
- Tk - Windows Manager
- Tk - Events
- Tk - Images
- Tk - Fonts
- Tk - Mega Widgets
- Tk - Canvas Widgets
- Tk - Selection Widgets
- Tk - Layout Widgets
- Tk - Basic Widgets
- Tk - Widgets Overview
- Tk - Special Variables
- Tk - Environment
- Tk - Overview
Tcl/Tk Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Tk - Layout Widgets
Tk - Layout Widgets
Layout widgets are used to handle layouts for the Tk apppcation. Frame widget is used group other widgets and place, pack, and grid are layout manager to give you total control over your adding to windows. The pst of available layout widgets are as shown below −
Sr.No. | Widgets & Description |
---|---|
1 | Container widget to hold other widgets. |
2 | Widget to hold other widgets in specific place with coordinates of its origin and an exact size. |
3 | Simple widget to organize widgets in blocks before placing them in the parent widget. |
4 | Widget to nest widgets packing in different directions. |
A simple Tk example is shown below for layout widgets −
#!/usr/bin/wish frame .myFrame1 -background red -repef ridge -borderwidth 8 -padx 10 -pady 10 -height 100 -width 100 frame .myFrame2 -background blue -repef ridge -borderwidth 8 -padx 10 -pady 10 -height 100 -width 50 pack .myFrame1 pack .myFrame2
When we run the above program, we will get the following output −
Advertisements