import
wx
class
FrameUI(wx.Frame):
def
__init__(
self
, parent, title):
super
(FrameUI,
self
).__init__(parent, title
=
title, size
=
(
300
,
200
))
self
.InitUI()
def
InitUI(
self
):
pnl
=
wx.Panel(
self
)
lblList
=
[
'Radio One'
,
'Radio Two'
]
self
.rbox
=
wx.RadioBox(pnl, label
=
'RadioBox'
, pos
=
(
80
,
10
), choices
=
lblList,
majorDimension
=
1
, style
=
wx.RA_SPECIFY_ROWS)
self
.rbox.SetItemToolTip(
0
,
"ToolTip item 0"
)
print
(
self
.rbox.GetItemToolTip(
0
).GetTip())
self
.Centre()
self
.SetSize((
400
,
250
))
self
.Show(
True
)
ex
=
wx.App()
FrameUI(
None
,
'RadioButton and RadioBox'
)
ex.MainLoop()