rev: tip wxPython2wxGlade/example.py -rw-r--r-- 1.6 KiB View raw Log this file
a4a220cecd40 — Carsten Grohmann Typo 3 months ago
                                                                                
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# -*- coding: LATIN-1 -*-

import wx


class UIReport(wx.Dialog):
    def __init__(self, *args, **kwds):
        wx.Dialog.__init__(self, *args,
                           style=wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.RESIZE_BORDER,
                           **kwds)

        self.SetSize((600, 300))
        self.SetTitle("Bericht ansehen")
        self.SetFocus()
        
        root_sizer = wx.BoxSizer(wx.VERTICAL)
        
        text_ctrl = wx.TextCtrl(self, wx.ID_ANY, "")
        root_sizer.Add(text_ctrl, 1, wx.ALL | wx.EXPAND, 5)
        
        static_line = wx.StaticLine(self, wx.ID_ANY)
        root_sizer.Add(static_line, 0, wx.ALL | wx.EXPAND, 5)
        
        sz_buttons = wx.FlexGridSizer(2, 2, 0, 0)
        root_sizer.Add(sz_buttons, 0, wx.EXPAND, 0)
        
        bn_Print = wx.Button(self, wx.ID_PRINT, "")
        sz_buttons.Add(bn_Print, 1, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL | wx.EXPAND, 5)
        
        bn_PrintPreview = wx.Button(self, wx.ID_PREVIEW, "")
        sz_buttons.Add(bn_PrintPreview, 1, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL | wx.EXPAND, 5)
        
        bn_Close = wx.Button(self, wx.ID_CLOSE, "")
        bn_Close.SetFocus()
        sz_buttons.Add(bn_Close, 1, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL | wx.EXPAND, 5)
        
        bn_Save = wx.Button(self, wx.ID_SAVE, "")
        sz_buttons.Add(bn_Save, 1, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL | wx.EXPAND, 5)
        
        sz_buttons.AddGrowableCol(0)
        sz_buttons.AddGrowableCol(1)
        
        self.SetSizer(root_sizer)
        
        self.Layout()