本文整理汇总了Python中wx.DP_DROPDOWN属性的典型用法代码示例。如果您正苦于以下问题:Python wx.DP_DROPDOWN属性的具体用法?Python wx.DP_DROPDOWN怎么用?Python wx.DP_DROPDOWN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.DP_DROPDOWN属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DP_DROPDOWN [as 别名]
def __init__(self, parent):
wx.Dialog.__init__(self, parent)
self.SetBackgroundColour('#ffffff')
self.ok_button = wx.Button(self, wx.ID_OK, label='Ok')
self.datepicker = wx.DatePickerCtrl(self, style=wx.DP_DROPDOWN)
vertical_container = wx.BoxSizer(wx.VERTICAL)
vertical_container.AddSpacer(10)
vertical_container.Add(wx_util.h1(self, label='Select a Date'), 0, wx.LEFT | wx.RIGHT, 15)
vertical_container.AddSpacer(10)
vertical_container.Add(self.datepicker, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 15)
vertical_container.AddSpacer(10)
button_sizer = wx.BoxSizer(wx.HORIZONTAL)
button_sizer.AddStretchSpacer(1)
button_sizer.Add(self.ok_button, 0)
vertical_container.Add(button_sizer, 0, wx.LEFT | wx.RIGHT, 15)
vertical_container.AddSpacer(20)
self.SetSizerAndFit(vertical_container)
self.Bind(wx.EVT_BUTTON, self.OnOkButton, self.ok_button)
示例2: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DP_DROPDOWN [as 别名]
def __init__(self, parent):
wx.Dialog.__init__(self, parent)
self.SetBackgroundColour('#ffffff')
self.ok_button = wx.Button(self, label='Ok')
self.datepicker = wx.DatePickerCtrl(self, style=wx.DP_DROPDOWN)
vertical_container = wx.BoxSizer(wx.VERTICAL)
vertical_container.AddSpacer(10)
vertical_container.Add(wx_util.h1(self, label='Select a Date'), 0, wx.LEFT | wx.RIGHT, 15)
vertical_container.AddSpacer(10)
vertical_container.Add(self.datepicker, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 15)
vertical_container.AddSpacer(10)
button_sizer = wx.BoxSizer(wx.HORIZONTAL)
button_sizer.AddStretchSpacer(1)
button_sizer.Add(self.ok_button, 0)
vertical_container.Add(button_sizer, 0, wx.LEFT | wx.RIGHT, 15)
vertical_container.AddSpacer(20)
self.SetSizerAndFit(vertical_container)
self.Bind(wx.EVT_BUTTON, self.OnOkButton, self.ok_button)
示例3: _MakeDateEditor
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DP_DROPDOWN [as 别名]
def _MakeDateEditor(olv, rowIndex, subItemIndex):
dte = DateEditor(olv, style=wx.DP_DROPDOWN | wx.DP_SHOWCENTURY | wx.WANTS_CHARS)
#dte.SetValidator(MyValidator(olv))
return dte