Start working on collapsable pane
This commit is contained in:
parent
efc6f8c8c0
commit
8fe7f45f62
1 changed files with 12 additions and 3 deletions
15
src/main.py
15
src/main.py
|
@ -167,12 +167,11 @@ class Cast(wx.Frame):
|
|||
|
||||
for item in channel.get_items(): # type: ignore
|
||||
inner_sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
pane_sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
title = wx.StaticText(self.m_panel, -1)
|
||||
title.SetLabelMarkup("<span weight='bold' >{}</span>".format(
|
||||
item["title"]))
|
||||
description = wx.StaticText(self.m_panel, -1, item["description"])
|
||||
|
||||
description.Wrap(WIDTH - 2)
|
||||
bitmap = item["thumbnail"]
|
||||
btn = wx.BitmapButton(self.m_panel,
|
||||
id=self.m_index,
|
||||
|
@ -185,7 +184,17 @@ class Cast(wx.Frame):
|
|||
)
|
||||
inner_sizer.Add(title)
|
||||
inner_sizer.Add(btn)
|
||||
inner_sizer.Add(description)
|
||||
collapsable_pane = wx.CollapsiblePane(self.m_panel, wx.ID_ANY, "Details:")
|
||||
inner_sizer.Add(collapsable_pane, 0, wx.GROW | wx.ALL, 5)
|
||||
pane_win = collapsable_pane.GetPane()
|
||||
# now add a test label in the collapsible pane using a sizer to layout it:
|
||||
description = wx.StaticText(pane_win, -1, item["description"])
|
||||
description.Wrap(WIDTH - 2)
|
||||
|
||||
pane_sizer.Add(description, wx.GROW | wx.ALL, 2)
|
||||
pane_win.SetSizer(pane_sizer)
|
||||
pane_sizer.SetSizeHints(pane_win)
|
||||
#inner_sizer.Add(description)
|
||||
self.m_sizer.Add(inner_sizer)
|
||||
self.m_sizer.AddSpacer(SPACER_HEIGHT)
|
||||
self.m_index = self.m_index + 1
|
||||
|
|
Loading…
Add table
Reference in a new issue