CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

unknown option "-indicatoron" for CTkRadioButton

Open Mo7mud opened this issue 3 years ago • 2 comments

I'm trying to use indicatoron arg for RadioButton but I get this error :

File "e:\python\gui.py", line 24, in <module>
    check_button = customtkinter.CTkRadioButton(
  File "C:\Users\Mohammad\AppData\Local\Programs\Python\Python310\lib\site-packages\customtkinter\widgets\ctk_radiobutton.py", line 36, in __init__
    super().__init__(*args, bg_color=bg_color, width=width, height=height, **kwargs)
  File "C:\Users\Mohammad\AppData\Local\Programs\Python\Python310\lib\site-packages\customtkinter\widgets\widget_base_class.py", line 30, in __init__
    super().__init__(*args, width=width, height=height, **kwargs)  # set desired size of underlying tkinter.Frame
  File "C:\Users\Mohammad\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 3153, in __init__
    Widget.__init__(self, master, 'frame', cnf, {}, extra)
  File "C:\Users\Mohammad\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 2601, in __init__
    self.tk.call(
_tkinter.TclError: unknown option "-indicatoron"

This is my code:

from tkinter import *
import tkinter
import customtkinter

customtkinter.set_appearance_mode("System")
customtkinter.set_default_color_theme("blue")

def click():
    print(food[x.get()])

food = ["Foody", "Foodo", "Foodna"]

window = customtkinter.CTk()
# window.geometry("420x420")
x = IntVar()

window.title("Title")
icon = PhotoImage(file='btc.png')
window.iconphoto(True, icon)
for i in range(len(food)):
    check_button = customtkinter.CTkRadioButton(
                window, 
                text = food[i],
                variable=x,
                value=i,
                command=click,
                padx=15,
                pady=5,
                text_font=('',14),
                indicatoron=0
            )
    check_button.pack(ancho=W)
window.mainloop()

python version 3.10.7 windows 10

Mo7mud avatar Sep 22 '22 07:09 Mo7mud

This option does not exists for CTkRadioButton. What do you want to accomplish with this option? Can you use something else?

TomSchimansky avatar Sep 22 '22 11:09 TomSchimansky

This option does not exists for CTkRadioButton. What do you want to accomplish with this option? Can you use something else?

Nothing specific I was just learning the library Does slider have the option showvalue? Is slider the replacement for Scale in python?

Mo7mud avatar Sep 22 '22 18:09 Mo7mud