wxFormBuilder TimePickerCtrl 导出Python出错的解决办法
wxFormBuilder TimePickerCtrl 导出Python出错的解决办法
修改 plugins\additional\xml\additional.pythoncode 文件。
找到 TimePickerCtrl 相关的位置,改成:
<templates class="wxTimePickerCtrl">
<template name="construction">self.$name = wx.adv.TimePickerCtrl( #wxparent $name, $id, wx.DefaultDateTime, $pos, $size, wx.adv.TP_DEFAULT #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, wx.DefaultValidator, $window_name @} )</template>
<template name="include">import wx.adv</template>
<template name="evt_connect_OnTimeChanged">self.$name.Bind( wx.adv.EVT_TIME_CHANGED, #handler )</template>
</templates>