twblue/src/wxUI/buffers/trends.py

25 lines
876 B
Python
Raw Normal View History

2015-02-01 21:13:18 -06:00
# -*- coding: utf-8 -*-
import wx
from multiplatform_widgets import widgets
class trendsPanel(wx.Panel):
def create_list(self):
""" Returns the list for put the tweets here."""
self.list = widgets.list(self, _(u"Trending topic"), style=wx.LC_REPORT|wx.LC_SINGLE_SEL|wx.LC_VRULES)
self.list.set_windows_size(0, 30)
self.list.set_size()
def __init__(self, parent, name):
super(trendsPanel, self).__init__(parent)
self.type = "trends"
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.create_list()
self.tweet = wx.Button(self, -1, _(u"Tweet"))
self.tweetTrendBtn = wx.Button(self, -1, _(u"Tweet about this trend"))
btnSizer = wx.BoxSizer(wx.HORIZONTAL)
btnSizer.Add(self.tweet, 0, wx.ALL, 5)
btnSizer.Add(self.tweetTrendBtn, 0, wx.ALL, 5)
self.sizer.Add(btnSizer, 0, wx.ALL, 5)
self.sizer.Add(self.list.list, 0, wx.ALL, 5)
self.SetSizer(self.sizer)