Overview
| Artifact ID: | 2410a50dc0cbb925c0f845db06b80a4e0d0437fc13dcc0815b9e59af53ea21a1 |
|---|---|
| Ticket: | 5510bec04291c0ee7c27a02a701307ca4efdaa4c
Internal padding settings of grid geometry manager inside Frame (eg: ipadx and ipady) are not working as explained in TK Documentation. |
| User & Date: | 70091112 on 2023-07-11 05:49:11 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Demonstration program to recreate the bug: from tkinter import * from tkinter import ttk root=Tk() # New window is created. frame1=ttk.Frame(root,relief='sunken',borderwidth=5) # First Frame is been defined. frame1.grid(column=0,row=0,padx=10,pady=10) # Outer padding(padx and pady) is given to First Frame. btn1=ttk.Button(frame1,text='Button1') # Button1, which is use as an slave widget of Frame1, is been defined. btn1.grid() # Button1 is created. frame2=ttk.Frame(root,relief='sunken',borderwidth=5) # Second Frame is been defined. frame2.grid(column=1,row=0,ipadx=10,ipady=10) # Internal padding(ipadx and ipady) is given to Second Frame. btn2=ttk.Button(frame2,text='Button2') # Button2, which is use as an slave widget of Frame2, is been defined. btn2.grid() # Button2 is created. root.mainloop() The above code demonstrate the bug discuss in this bug report. Problem: Internal padding for grid layout inside Frame widget is not working as per Grid reference manual (accessible at : https://tcl.tk/man/tcl8.6/TkCmd/grid.htm). In this reference manual internal padding attribute(ipadx and ipady) are explained as below: -ipadx amount: "The amount specifies how much horizontal internal padding to leave on each side of the content. This is space is added inside the content border. The amount must be a valid screen distance, such as 2 or .5c. It defaults to 0." -ipady amount: "The amount specifies how much vertical internal padding to leave on the top and bottom of the content. This space is added inside the content border. The amount defaults to 0." In above explanation it is clearly mentioned that internal padding is LEAVE ON EACH SIDE OF THE CONTENT. -But as we can see in the demonstrated window generated using our demonstrated program the padding between borders of frame2 and btn2 are not equal on each side. There is no padding between frame2's top border and btn2's top border as well as frame2's left border and btn2's left border. Furthermore, the padding expected on the left side and top side are being added to the right side and bottom side respectively. This behavior is not as per explained in the reference manual. -The external padding (using: padx,pady) is working perfectly as explained in reference manual but internal padding (using: ipadx,ipady) is not working as explained in reference manual. CONCUSSION: THE INTERNAL PADDING MUST BE EQUAL ON EACH SIDE.
- foundin changed to: "8.6"
- is_private changed to: "0"
- login: "70091112"
- priority changed to: "5 Medium"
- private_contact changed to: "dfb0a28610e5bab51ece92ce1b502d7460192f59"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "70091112"
- subsystem changed to: "69. Other"
- title changed to:
Internal padding settings of grid geometry manager inside Frame (eg: ipadx and ipady) are not working as explained in TK Documentation.
- type changed to: "Bug"