File: htmlpreview.py

package info (click to toggle)
pythoncard 0.8.1-8.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 5,352 kB
  • ctags: 4,594
  • sloc: python: 42,401; makefile: 55; sh: 22
file content (25 lines) | stat: -rw-r--r-- 732 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
__version__ = "$Revision: 1.1 $"
__date__ = "$Date: 2004/07/26 15:54:31 $"
"""

from PythonCard import model
import wx
import sys

class HtmlPreview(model.Background):

    def on_initialize(self, event):
        if sys.platform.startswith('win'):
            size = self.components.html.size
            del self.components['html']
            self.components['html'] = {'type':'IEHtmlWindow', 'name':'html', 
                'position':(0, 0), 'size':size, 'visible':True}
        else:
            self.components.html.SetRelatedFrame(self, "HTML Preview: %s")
            self.components.html.SetRelatedStatusBar(0)

        self.singleItemExpandingSizerLayout()

    def on_close(self, event):
        self.visible = False