Jun-22-2018, 03:46 PM
Hello, I'm a french who want to create something for my Casio (it's calc)
In fact, you can made some draw but it's pretty long and hard.
That's why I want to create with Python a GUI who recreate my calculator's screen (127x63)
I want to make :
GUI of ALL screen, when you touch one pixel, it color change to black.
When you have finish, you can create .txt with your "art" for Casio. (Plotln x,y) Of course, only the black pixel.
For the moment, I have this :
And how can I pick up information about the color of the button ? $
Sorry about my bad English.
Tituya
In fact, you can made some draw but it's pretty long and hard.
That's why I want to create with Python a GUI who recreate my calculator's screen (127x63)
I want to make :
GUI of ALL screen, when you touch one pixel, it color change to black.
When you have finish, you can create .txt with your "art" for Casio. (Plotln x,y) Of course, only the black pixel.
For the moment, I have this :
# coding: utf-8 from tkinter import * import tkinter as tk from tkinter.messagebox import * main = Tk() main.geometry("500x400+500+250") main.title('1er version') main['bg'] = 'white' nomfichier = 'CasioMaker.txt' def a(): fichier = open(nomfichier, 'w') fichier.write('\'Made by Tituya\n') fichier.write('Cls\n') fichier.write('ViewWindow 1,127,1,1,63,1\n') fichier.write('AxesOff\n') fichier.close() def c(): for ligne1 in range(10): for colonne1 in range(10): button = tk.Button(main, borderwidth=1, background='white', width=2, height=1) button['command'] = lambda button=button: button.configure(background = 'black') button.grid(row=ligne1, column=colonne1) def b(): if askyesno('Titre 1', 'Etes vous sur ? Toutes progression sera éffacée'): main.quit() else: pass for ligne in range(10): for colonne in range(10): button = tk.Button(main, borderwidth=1, background='white', width=2, height=1) button['command'] = lambda button=button: button.configure(background = 'black') button.grid(row=ligne, column=colonne) menu = Menu(main) sousmenu = Menu(menu, tearoff=0) menu.add_cascade(label="Menu", menu=sousmenu) sousmenu.add_command(label="Creer le fichier texte", command=a) sousmenu.add_command(label="Quitter", command=b) menu.add_command(label="Effacer", command=c) main.config(menu = menu) main.mainloop()But, for the moment It's only some button and, if I want to do the screen, the button are too big for the screen. (Maybe scrollbar ?)
And how can I pick up information about the color of the button ? $
Sorry about my bad English.
Tituya
