从wxpython中的小部件读取数据

从wxpython中的小部件读取数据,wxpython,Wxpython,我想知道当我单击所附图片中的OK按钮后,如何从TextCtrl框中读取开始地址和结束地址的数据。您需要调用每个文本控件的GetValue()方法GetValue()`返回文本控件中的任何内容 假设起始地址文本控件称为self.start\u address。在button的处理程序中,可以执行以下操作: def on_ok(self, event): start_address = self.start_address.GetValue() 您需要调用每个文本控件的GetValue()


我想知道当我单击所附图片中的OK按钮后,如何从TextCtrl框中读取开始地址和结束地址的数据。

您需要调用每个文本控件的
GetValue()
方法GetValue()`返回文本控件中的任何内容

假设起始地址文本控件称为
self.start\u address
。在button的处理程序中,可以执行以下操作:

def on_ok(self, event):
    start_address = self.start_address.GetValue()

您需要调用每个文本控件的
GetValue()
方法GetValue()`返回文本控件中的任何内容

假设起始地址文本控件称为
self.start\u address
。在button的处理程序中,可以执行以下操作:

def on_ok(self, event):
    start_address = self.start_address.GetValue()