Bonsoir

J'aimerais créer des PanelWindows verticalement.
Je passe le paramètre VERTICAL à la fonction PanedWindow(p1, orient=VERTICAL)
Mon code est
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# https://pythonguides.com/python-tkinter-panel/
from tkinter import *
 
ws=Tk()
ws.title("Python Guides")
ws.geometry("500x300")
 
p1 = PanedWindow()
p1.pack(fill=BOTH, expand=1)
 
p2 = PanedWindow(p1, orient=VERTICAL)
p1.add(p2)
 
top = Label(p2, text="Top Panel")
p2.add(top)
 
p2 = PanedWindow(p1, orient=VERTICAL)
p1.add(p2)
 
top = Label(p2, text="Top2 Panel")
p2.add(top)
 
p2 = PanedWindow(p1, orient=VERTICAL)
p1.add(p2)
 
top = Label(p2, text="Top3 Panel")
p2.add(top)
 
 
ws.mainloop()
Le résultat est à l'horizontal.

Nom : PannelHorizontaux.png
Affichages : 293
Taille : 3,3 Ko


Pour info, j'ai tenté de mettre HORIZONTAL, sans plus de succés.