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

Source Code for Module Gnumed.wxGladeWidgets.wxgTextExpansionEditAreaPnl

 1  #!/usr/bin/env python 
 2  # -*- coding: utf-8 -*- 
 3  # generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-cvs/branches/HEAD/gnumed/gnumed/client/wxg/wxgTextExpansionEditAreaPnl.wxg" 
 4   
 5  import wx 
 6   
 7  # begin wxGlade: extracode 
 8  # end wxGlade 
 9   
10   
11   
12 -class wxgTextExpansionEditAreaPnl(wx.ScrolledWindow):
13 - def __init__(self, *args, **kwds):
14 # begin wxGlade: wxgTextExpansionEditAreaPnl.__init__ 15 kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL 16 wx.ScrolledWindow.__init__(self, *args, **kwds) 17 self._TCTRL_keyword = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER) 18 self._TCTRL_expansion = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE) 19 self._RBTN_private = wx.RadioButton(self, -1, _("&Me only"), style=wx.RB_GROUP) 20 self._RBTN_public = wx.RadioButton(self, -1, _("&All users")) 21 22 self.__set_properties() 23 self.__do_layout()
24 # end wxGlade 25
26 - def __set_properties(self):
27 # begin wxGlade: wxgTextExpansionEditAreaPnl.__set_properties 28 self.SetScrollRate(10, 10) 29 self._TCTRL_keyword.SetToolTipString(_("The keyword you want to trigger this text expansion.\n\nTry to avoid words or abbreviations in their day-to-day form as you may want to use them verbatim. Rather prefix or suffix your keywords with, say, \"*\" or \"$\". It is wise to not suffix keywords with typical word separators, such as:\n\n ! ? . , : ; ) ] } / ' \" SPACE TAB LINEBREAK\n\nas those are needed to detect when to trigger keyword expansion.")) 30 self._TCTRL_expansion.SetToolTipString(_("This is the text the keyword will expand to. You can use any text-based punctuation and formatting.")) 31 self._TCTRL_expansion.Enable(False) 32 self._RBTN_private.SetToolTipString(_("Select this if you want to use this text expansion just for yourself.")) 33 self._RBTN_public.SetToolTipString(_("Select this if you want to enable all GNUmed users to invoke this expansion (unless they have defined their own expansion with the same keyword).")) 34 self._RBTN_public.SetValue(1)
35 # end wxGlade 36
37 - def __do_layout(self):
38 # begin wxGlade: wxgTextExpansionEditAreaPnl.__do_layout 39 _gszr_main = wx.FlexGridSizer(7, 2, 1, 3) 40 __szr_scope = wx.BoxSizer(wx.HORIZONTAL) 41 __lbl_keyword = wx.StaticText(self, -1, _("Keyword")) 42 _gszr_main.Add(__lbl_keyword, 0, wx.ALIGN_CENTER_VERTICAL, 0) 43 _gszr_main.Add(self._TCTRL_keyword, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 44 __lbl_expansion = wx.StaticText(self, -1, _("Expand to")) 45 _gszr_main.Add(__lbl_expansion, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 46 _gszr_main.Add(self._TCTRL_expansion, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 47 __lbl_scope = wx.StaticText(self, -1, _("Scope")) 48 _gszr_main.Add(__lbl_scope, 0, wx.ALIGN_CENTER_VERTICAL, 0) 49 __szr_scope.Add(self._RBTN_private, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5) 50 __szr_scope.Add(self._RBTN_public, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 51 _gszr_main.Add(__szr_scope, 1, wx.EXPAND, 0) 52 self.SetSizer(_gszr_main) 53 _gszr_main.Fit(self) 54 _gszr_main.AddGrowableRow(1) 55 _gszr_main.AddGrowableCol(1)
56 # end wxGlade 57 58 # end of class wxgTextExpansionEditAreaPnl 59