如何在父框架之外的 wxpython 中添加 window 并在 sqlite 查询中使用信息

How to add a window in wxpython other then parent frame and use information in sqlite query

我的父框架中有一个按钮(名为添加)。我想在用户单击该按钮时打开一个 TextEntryDialog,我想像弹出窗口一样打开它 window.And 我必须将用户键入的文本发送回父框架,我将把它插入到我的数据库中 table。如果我可以制作一个 editable listctrl 会更好,其中我将有 4 列,用户将信息填充到这些列中,然后通过 sqlite 查询我将这些信息填充到数据库中 table.So 怎么可能我完成这个?

第一个教程在第一页搜索"wxpython text dialog"

https://pythonspot.com/en/wxpython-input-dialog/
你好像一点努力都没有!

#!/usr/bin/python

import wx

def onButton(event):
    print "Button pressed."

app = wx.App()

frame = wx.Frame(None, -1, 'win.py')
frame.SetDimensions(0,0,200,50)

# Create text input
dlg = wx.TextEntryDialog(frame, 'Enter some text','Text Entry')
dlg.SetValue("Default")
if dlg.ShowModal() == wx.ID_OK:
    print('You entered: %s\n' % dlg.GetValue())
dlg.Destroy()