源代码:
import tkinter as tk
from tkinter import filedialog
import struct
import binascii
import os
class HexEditor:
def __init__(self, master):
self.master = master
self.master.title("十六进制编辑器")
self.master.configure(bg='black')
self.master.geometry("800x450+200+200")
self.scrollbar = tk.Scrollbar(master)
self.scrollbar.pack(side=tk.RIGHT, fill=tk.Y)
self.text_area = tk.Text(master, width=80, height=30, bg='black', fg='white', yscrollcommand=self.scrollbar.set)
self.text_area.pack(expand=True, fill=tk.BOTH)
self.scrollbar.config(command=self.text_area.yview)
self.open_button = tk.Button(master, text="打开文件", command=self.open_file, bg='gray', fg='white')
self.open_button.pack()
self.save_but
标签:十六进制,python,text,self,编辑器,scrollbar,master,tk,import
From: https://blog.csdn.net/linhhanpy/article/details/140938494