Пример #1
0
 def display_helpframe(self, help, title):
     from cellprofiler.gui.html.htmlwindow import HtmlClickableWindow
     helpframe = wx.Frame(self, -1, title, size=(640, 480))
     sizer = wx.BoxSizer()
     helpframe.SetSizer(sizer)
     window = HtmlClickableWindow(helpframe)
     sizer.Add(window, 1, wx.EXPAND)
     window.AppendToPage(help)
     helpframe.SetIcon(get_cp_icon())
     helpframe.Layout()
     helpframe.Show()
Пример #2
0
 def __init__(self, parent, title, contents):
     super(HTMLDialog, self).__init__(parent, -1, title, 
                                      style=(wx.DEFAULT_DIALOG_STYLE | 
                                             wx.RESIZE_BORDER))
     html = HtmlClickableWindow(parent=self)
     html.SetPage(contents)
     sizer = wx.BoxSizer(wx.VERTICAL)
     sizer.Add(html, 1, wx.EXPAND | wx.ALL, 5)
     sizer.Add(self.CreateStdDialogButtonSizer(wx.OK), flag=wx.CENTER)
     self.SetSizer(sizer)
     html.SetFocus()