当前位置:网站首页>When using the MessageBox of class toplevel, a problem pops up in the window.
When using the MessageBox of class toplevel, a problem pops up in the window.
2022-06-28 05:16:00 【sunshinei928】
Encountered main window and... In a small project toplevel Windows all use class Class time ,toplevel The window pops up messagebox Will automatically jump to the main window , meanwhile toplevel The window will automatically be behind the main window .
Looking up the information on the Internet , The main methods are in messagebox increase parent Parameters , The following code .
from tkinter.messagebox import *
root = Tk()
texto = Toplevel(root)
showinfo("title", "message",parent=texto)But the project uses class,toplevel There is no clear parent, stay csdn Is used by netizens parent=self._root, But after the test, it is not correct .
from tkinter import *
from tkinter.ttk import *
from tkinter.messagebox import *
import os
currentpath=os.path.dirname(__file__)
class AcurateQueryWindow(Toplevel):
showwarning('warning','input four parameters!')
Later stackoverflow Go up for help , The answer is parent=self. The test passed , Pop up messagebox be located toplevel Before window .
showwarning('warning','input four parameters!',parent=self)
边栏推荐
- Lumiprobe细胞成像分析:PKH26 细胞膜标记试剂盒
- Latest Windows version 5.0.14 of redis
- msa. h: There is no such file or directory
- Organize the online cake mall project
- SlicePlane的Heading角度与Math.atan2(y,x)的对应转换关系
- 【牛客网刷题系列 之 Verilog快速入门】~ 四选一多路器
- 店铺进销存管理系统源码
- [Verilog quick start of Niuke online question brushing series] ~ one out of four multiplexer
- Carboxylic acid study: lumiprobe sulfoacyanine 7 dicarboxylic acid
- Learn Taiji Maker - mqtt Chapter 2 (IV) esp8266 reserved message application
猜你喜欢

Feign通过自定义注解实现路径的转义

openssl客户端编程:一个不起眼的函数导致的SSL会话失败问题

【JVM系列】JVM调优

Lumiprobe细胞成像分析:PKH26 细胞膜标记试剂盒

DH parameters of robotics and derivation using MATLAB symbolic operation

2022新版nft源码中国元宇宙数字藏品艺术品交易平台源码

Extjs library management system source code intelligent library management system source code

Voltage mode and current mode control of switching power supply

2022年安全员-B证考试题库及答案

Wedding studio portal applet based on wechat applet
随机推荐
2022 high altitude installation, maintenance and removal examination questions and answers
店铺进销存管理系统源码
Lumiprobe细胞成像分析:PKH26 细胞膜标记试剂盒
证明素数/质数有无限多个
Simulation questions and answers of the latest national fire-fighting facility operators (primary fire-fighting facility operators) in 2022
现代交换原理MOOC部分题目整理
Assembly common instructions
Keil C51的Data Overlaying机制导致的函数重入问题
JS text box loses focus to modify width text and symbols
Cgo+gsoap+onvif learning summary: 8. Summary of arm platform cross compilation operation and common problems
机器人学DH参数及利用matlab符号运算推导
Understanding the source of innovation II
无线传感器网络学习笔记(一)
2022年安全员-B证考试题库及答案
【SkyWalking】一口气学完分布式链路追踪SkyWalking
【牛客网刷题系列 之 Verilog快速入门】~ 四选一多路器
Learning Tai Chi Maker - mqtt Chapter 2 (V) heartbeat mechanism
Extjs图书管理系统源码 智能化图书管理系统源码
创新之源 理解通透 二
[skywalking] learn distributed link tracking skywalking at one go