• Как сделать так, что бы при нажатии на Button активировался CheckButton?

    @tolianwork Автор вопроса
    from tkinter import ttk
    from tkinter import Tk
    import tkinter
    from tkinter import *
    import phonenumbers
    import webbrowser
    import tkinter.messagebox
    from tkinter import messagebox
    from phonenumbers import geocoder
    from phonenumbers import carrier
    from phonenumbers import timezone
    from colorama import Fore, Style
    
    class NumBer(Tk):
    
        __Modes = ('Beginner', 'Advanced', 'Pro')
        __Site = 'https://www.youtube.com/channel/UCSE7WXuUfcMOLCIfXR0hI_w'
    
    
    
        def __init__(self):
            Tk.__init__(self)
            self.geometry('300x200')
            self.title('HeroPhone')
            self.resizable(False, False)
            self.configure(bg='#293133')
            self.gui()
            self.ico_cm()
    
        def ico_cm(self):
            self.photo = tkinter.PhotoImage(file='callico.png')
            self.iconphoto(False, self.photo)
    
        def close(self):
            exit()
    
        def brows(self):
            webbrowser.open_new(url=self.__Site)\
    
        def code_1(self):
    
            x = phonenumbers.parse(self.ent_1.get(), 'None')
            carrier_1 = carrier.name_for_number(x, 'ru')
            regionn = geocoder.description_for_number(x, 'ru')
            timez = timezone.time_zones_for_number(x)
            messagebox.showinfo('Answer', f'Регион:\n{regionn}\nЧасовой пояс:\n{timez}\nМобильный оператор:\n{carrier_1}')
    
        def clear(self):
            self.ent_1.delete(0, 'end')
    
        def chka(self):
            self.but_4.config(state='normal')
    
        def gui(self):
    
            self.ent_1 = Entry(self,width=36)
            self.ent_1.place(x=75, y=11)
            self.lab_1 = Label(self, text='Find:',width=7, font=('KTF Jermilov Regular 400', 10, 'bold')).place(x=10, y=10)
            self.lab_2 = Label(self, text='Options:',width=7, font=('KTF Jermilov Regular 400', 10, 'bold')).place(x=10, y=40)
            self.but_1 = Button(self, text='Close',command=self.close, width=7, font=('KTF Jermilov Regular 400', 10, 'bold')).place(x=228, y=165)
            self.but_2 = Button(self, text='Start',command=self.code_1, width=11, font=('KTF Jermilov Regular 400', 10, 'bold')).place(x=125, y=165)
            self.but_3 = Checkbutton(self, text='Fast', font=('KTF Jermilov Regular 400', 10, 'bold')).place(x=77, y=40)
            self.but_4 = Checkbutton(self,text='Show', font=('KTF Jermilov Regular 400', 10, 'bold')).place(x=136, y=40)
            self.but_6 = Button(self, text='Url',command=self.brows,width=9, font=('KTF Jermilov Regular 400', 10, 'bold')).place(x=208, y=68)
            self.combo_1 = ttk.Combobox(self, values=NumBer.__Modes, width=11)
            self.combo_1.current(0)
            self.combo_1.place(x=205, y=40)
            self.but_5 = Button(self, text='Select all',command=self.chka, width=15, font=('KTF Jermilov Regular 400', 10, 'bold')).place(x=75, y=70)
            self.but_7 = Button(self, text='Clear',command=self.clear, width=6, font=('KTF Jermilov Regular 400', 10, 'bold')).place(x=10, y=70)
    
    root = NumBer()
    root.mainloop()
  • Как сделать так, что бы при нажатии на Button активировался CheckButton?

    @tolianwork Автор вопроса
    Ошибка: AttributeError: 'NoneType' object has no attribute 'config'
  • Как исправить TypeError: object of type 'Entry' has no len()?

    @tolianwork Автор вопроса
    Dr. Bacon, Я обернул, в данный момент я считаю, что пользователям поможет это
  • Что значит ошибка: nothing to commit, working tree clean?

    @tolianwork Автор вопроса
    Román Mirilaczvili, У меня не работает git status
  • Что значит ошибка: nothing to commit, working tree clean?

    @tolianwork Автор вопроса
    Сергей Кузнецов, У меня не работает git status
  • Как исправить "AttributeError: 'Message' object has no attribute 'id'"?

    @tolianwork Автор вопроса
    Проблема находится, как пишет мне Python, в:
    bot.edit_message_text(chat_id=query.message.chat.id,
    message_id=query.message.id,
    text=get_map_str(user_data['map'], (new_x, new_y)),
    reply_markup=keyboard)