mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-07-21 12:41:10 +02:00
Added wx.Treebook.GetTreeCtrl and wx.Choicebook.GetChoiceCtrl
(cherry picked from commit f85818a25d
)
47 lines
1.2 KiB
Python
47 lines
1.2 KiB
Python
import unittest
|
|
from unittests import wtc
|
|
import wx
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
class treebook_Tests(wtc.WidgetTestCase):
|
|
|
|
def test_treebook1(self):
|
|
wx.wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED
|
|
wx.wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING
|
|
wx.wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED
|
|
wx.wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED
|
|
|
|
wx.EVT_TREEBOOK_PAGE_CHANGED
|
|
wx.EVT_TREEBOOK_PAGE_CHANGING;
|
|
wx.EVT_TREEBOOK_NODE_COLLAPSED;
|
|
wx.EVT_TREEBOOK_NODE_EXPANDED;
|
|
|
|
|
|
def test_treebook2(self):
|
|
book = wx.Treebook()
|
|
book.Create(self.frame)
|
|
|
|
|
|
def test_treebook3(self):
|
|
book = wx.Treebook(self.frame)
|
|
book.AddPage(wx.Panel(book), 'one')
|
|
book.AddPage(wx.Panel(book), 'two')
|
|
book.AddSubPage(wx.Panel(book), 'three')
|
|
|
|
|
|
def test_treebook4(self):
|
|
book = wx.Treebook(self.frame)
|
|
book.AddPage(wx.Panel(book), 'one')
|
|
book.AddPage(wx.Panel(book), 'two')
|
|
book.AddSubPage(wx.Panel(book), 'three')
|
|
|
|
tree = book.GetTreeCtrl()
|
|
assert isinstance(tree, wx.TreeCtrl)
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|