Python - Configurar tamaño de las pestañas

 
Vista:
sin imagen de perfil
Val: 29
Ha disminuido su posición en 10 puestos en Python (en relación al último mes)
Gráfica de Python

Configurar tamaño de las pestañas

Publicado por Manu (10 intervenciones) el 23/08/2020 11:49:01
Hola.

Estoy intentando integrar en la pantalla principal aparezcan una pestañas, con su ventana correspondiente.

Mi pregunta:

Como definir el tamaño de las ventanas?

Como puedo incluir varios combobox dentro de las zona de cada una de las pestañas?

Gracias.
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
from tkinter import *
from tkinter import messagebox
from tkinter import ttk
 
import webbrowser
from tkinter import filedialog
from tkinter import scrolledtext as st
from xml.dom import minidom
import tkinter as tk
from tkinter.ttk import *
import sqlite3
 
 
class AboutFrame(ttk.Frame):
    """
    Para anunciar de que visiten mi pagina web.
    """
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
 
        self.label = ttk.Label(self)
        self.label["text"] = ("Visita mi pagina "+"\n" +
                              "mipagina.com")
        self.label.pack()
 
        self.web_button = ttk.Button(self, text="Visitar web", command =self.say_web)
        self.web_button.pack(pady=10)
 
    def say_web(self):
        webbrowser.open_new("www.mipagina.com")
 
 
 
 
class BusquedaFrame(ttk.Frame):
 
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
 
        self.name_entry = ttk.Entry(self)
        self.name_entry.pack()
 
        self.greet_button = ttk.Button(
            self, text="Saludar", command=self.say_hello)
        self.greet_button.pack()
 
        self.greet_label = ttk.Label(self)
        self.greet_label.pack()
 
        self.greet_ComB_Pais = ttk.Combobox(
            miFrame, values=PAIS
        )
        self.greet_ComB_Pais.pack()
 
    def say_hello(self):
        self.greet_label["text"] = \
            "¡Hola, {}!".format(self.name_entry.get())
 
 
 
 
class Application(ttk.Frame):
 
    def __init__(self, main_window):
        super().__init__(main_window)
        main_window.title("DXCC "+version)
 
 
        self.notebook = ttk.Notebook(self)
 
        self.greeting_frame = BusquedaFrame(self.notebook)
        self.notebook.add(
            self.greeting_frame, text="Busqueda", padding=10)
 
        self.about_frame = AboutFrame(self.notebook)
        self.notebook.add(
            self.about_frame, text="Acerca de", padding=10)
 
        self.notebook.pack(padx=10, pady=10)
        self.pack()
 
 
#-----------------------------------Variables---------------------------------------------
version  = " 0.0.2"
 
 
#--------------------------------------------------------------------------------
 
 
root  =  Tk()
root.title("Prueba "+version)
 
miFrame = Frame()
"""
miFrame.pack()
miFrame.config(width="600", height="600")
"""
miFrame == Application(root)
Captura-de-pantalla-2020-08-23-a-las-11.48.24
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil
Val: 233
Ha disminuido 1 puesto en Python (en relación al último mes)
Gráfica de Python

Configurar tamaño de las pestañas

Publicado por salvamn (62 intervenciones) el 23/08/2020 22:55:50
a la pestaña del notebook se le puede añadir un frame con las dimensiones que desees y dentro del frame añades los widgets que quieraas
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar