[Python] How to display special characters in DearPyGui Checkbox Label?

Discussão em 'Python' iniciado por Stack, Novembro 23, 2024.

  1. Stack

    Stack Membro Participativo

    I have been making a gui app using dearpygui and I ran into a weird problem when adding labels to checkboxes. For some reason it wont show the character "#" in the labels. I am trying to assign music notes to each checkbox through recursive looping and that includes sharps so I cant just overlook it. I thought a first that maybe it was a data type problem but ruled that out pretty quick seeing as the program still ran and displayed labels but the letters only.

    Here is a code snippet from my program for adding the checkboxes:

    with dpg.window(tag="Primary Window"):
    dpg.add_text("WELCOME TO YOUR FRETBOARD")

    with dpg.table(header_row=False):
    for l in range(0,12):
    dpg.add_table_column()

    for i in range(0, 1):
    with dpg.table_row():
    for j in range(0, 12):
    dpg.add_checkbox(label=note[0][j])


    The program is taking the note names from a numpy array as such:

    note = np.array([["E","F","F#","G","G#","A","A#","B","C","C#","D","D#","E","F","F#","G","G#","A","A#","B","C","C#","D"],
    ["A","A#","B","C","C#","D","D#","E","F","F#","G","G#","A","A#","B","C","C#","D","D#","E","F","F#","G"],
    ["D","D#","E","F","F#","G","G#","A","A#","B","C","C#","D","D#","E","F","F#","G","G#","A","A#","B","C"],
    ["G","G#","A","A#","B","C","C#","D","D#","E","F","F#","G","G#","A","A#","B","C","C#","D","D#","E","F"],
    ["B","C","C#","D","D#","E","F","F#","G","G#","A","A#","B","C","C#","D","D#","E","F","F#","G","G#","A"],
    ["E","F","F#","G","G#","A","A#","B","C","C#","D","D#","E","F","F#","G","G#","A","A#","B","C","C#","D"]])


    Here is a screenshot of my output for the program: [​IMG]

    The red bit is the particular feature I'm focusing on.

    I couldn't find any existing cases of people having this problem so I'm assuming this is a "me problem" to an extent. Any and all information is welcome

    Continue reading...

Compartilhe esta Página