python - PySimpleGUI,sg.Output 不可更改
问题描述
如何使输出为只读,而不能删除或更改其中的文本?
class TelaLogin:
def __init__(self):
layout= [
[sg.Image(data=bordacima, key='__IMAGE3__')],
[sg.Image(data=emailimg, pad=(301,0), key='__IMAGE8__')],
[sg.Input(justification='left', pad=(343, 0), size=(25, 0))],
[sg.Text('')],
[sg.Image(data=senhaimg, pad=(301,0), key='__IMAGE7__')],
[sg.Input(justification='left', password_char=('*'), size=(25, 0), pad=(343, 0))],
[sg.Button('', image_data=conectar1, button_color=('black', 'black'), pad=(383, 7))],
***[sg.Output(size=(40, 4), pad=(281, 4))],***
]
self.janela = sg.Window('UniquePT').layout(layout)
def Conectar(self):
while True:
self.button, self.values = self.janela.Read()
print(f'Conectando...')
GAME = login(self)
print(f'')
print(f'')
解决方案
推荐阅读
- php - cUrl 没有发送帖子数据
- java - JavaFX BarChart - 主轴系列
- android - 将 Application 或 ApplicationContext 传递给 ViewModel?
- python - k-gram 索引方法和标准 python 字符串方法在处理通配符查询中的区别
- ios - 在 Flutter 应用程序中查找 iOS 包标识符
- c++ - 调试递归问题;输出错误
- excel - 使用合并单元格清除命名范围
- arrays - Google Apps 脚本:如何将数组中的元素插入多维数组?
- java - 限制访问 MySQL 数据库、局域网 Java 桌面应用程序
- google-drive-api - Google Drive /files/'fileid' 上的间歇性 CORS 错误