Package Gnumed :: Package wxGladeWidgets :: Module wxgTagImageEAPnl |
[frames] | no frames]

# Source Code for Module Gnumed.wxGladeWidgets.wxgTagImageEAPnl

     1  #!/usr/bin/env python
     2  # -*- coding: utf8 -*-
     3  # generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-git/gnumed/gnumed/client/wxg/wxgTagImageEAPnl.wxg"
     4
     5  import wx
     6
     7  # begin wxGlade: extracode
     8  # end wxGlade
     9
    10
    11
    12 -class wxgTagImageEAPnl(wx.ScrolledWindow):
    13 -    def __init__(self, *args, **kwds):
    14          # begin wxGlade: wxgTagImageEAPnl.__init__
    15          kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL
    16          wx.ScrolledWindow.__init__(self, *args, **kwds)
    17          self._TCTRL_description = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
    18          self._TCTRL_filename = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
    19          self._BMP_image = wx.lib.statbmp.GenStaticBitmap(self, -1, wx.NullBitmap, style=wx.SIMPLE_BORDER)
    20          self._BTN_pick_image = wx.Button(self, -1, _("&Pick"), style=wx.BU_EXACTFIT)
    21
    22          self.__set_properties()
    23          self.__do_layout()
    24
    25          self.Bind(wx.EVT_BUTTON, self._on_pick_image_button_pressed, self._BTN_pick_image)
    26          # end wxGlade
    27
    28 -    def __set_properties(self):
    29          # begin wxGlade: wxgTagImageEAPnl.__set_properties
    30          self.SetScrollRate(10, 10)
    31          self._TCTRL_description.SetToolTipString(_("A name for the tag.\n\nNote that there cannot be two tags with the same name."))
    32          self._TCTRL_filename.SetToolTipString(_("An example file name for this image. Mainly used for deriving a suitable file extension."))
    33          self._BMP_image.SetMinSize((100, 100))
    34          self._BMP_image.SetToolTipString(_("The image to use for the tag.\n\nDo not use a big image because the tag will be downscaled anyway."))
    35          self._BTN_pick_image.SetToolTipString(_("Pick the file from which to load the tag image."))
    36          # end wxGlade
    37
    38 -    def __do_layout(self):
    39          # begin wxGlade: wxgTagImageEAPnl.__do_layout
    40          _gszr_main = wx.FlexGridSizer(3, 2, 1, 3)
    41          __szr_image = wx.BoxSizer(wx.HORIZONTAL)
    42          __lbl_name = wx.StaticText(self, -1, _("Tag name"))
    43          __lbl_name.SetForegroundColour(wx.Colour(255, 0, 0))
    44          _gszr_main.Add(__lbl_name, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    45          _gszr_main.Add(self._TCTRL_description, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
    46          __lbl_fname = wx.StaticText(self, -1, _("File name"))
    47          _gszr_main.Add(__lbl_fname, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    48          _gszr_main.Add(self._TCTRL_filename, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
    49          __lbl_image = wx.StaticText(self, -1, _("Image"))
    50          __lbl_image.SetForegroundColour(wx.Colour(255, 0, 0))
    51          _gszr_main.Add(__lbl_image, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    52          __szr_image.Add(self._BMP_image, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 3)
    53          __szr_image.Add(self._BTN_pick_image, 0, wx.ALIGN_CENTER_VERTICAL, 0)
    54          _gszr_main.Add(__szr_image, 1, wx.EXPAND, 0)
    55          self.SetSizer(_gszr_main)
    56          _gszr_main.Fit(self)
    57          _gszr_main.AddGrowableCol(1)
    58          # end wxGlade
    59
    60 -    def _on_pick_image_button_pressed(self, event): # wxGlade: wxgTagImageEAPnl.<event_handler>
    61          print "Event handler `_on_pick_image_button_pressed' not implemented!"
    62          event.Skip()
    63
    64  # end of class wxgTagImageEAPnl
    65