diff options
author | Josh Blum <josh@joshknows.com> | 2009-09-29 15:34:58 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2009-09-29 15:34:58 -0700 |
commit | 57e810d3f07909947a9fb2daeb507b439d5f4f50 (patch) | |
tree | 3eac2f3de1a87e614ef7ac2df4f3d4df51aa803a /gr-wxgui/src | |
parent | 85a8e6cdb0fb05b12b071c81f9eb025b380fb155 (diff) |
added access methods for gps stuff
Diffstat (limited to 'gr-wxgui/src')
-rw-r--r-- | gr-wxgui/src/python/forms/forms.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gr-wxgui/src/python/forms/forms.py b/gr-wxgui/src/python/forms/forms.py index 8dc58367d9..19b30ffb0a 100644 --- a/gr-wxgui/src/python/forms/forms.py +++ b/gr-wxgui/src/python/forms/forms.py @@ -194,15 +194,19 @@ class static_text(_form_base): @param label title label for this widget (optional) @param width the width of the form in px @param bold true to bold-ify the text (default=False) + @param units a suffix to add after the text @param converter forms.str_converter(), int_converter(), float_converter()... """ - def __init__(self, label='', width=-1, bold=False, converter=converters.str_converter(), **kwargs): + def __init__(self, label='', width=-1, bold=False, units='', converter=converters.str_converter(), **kwargs): + self._units = units _form_base.__init__(self, converter=converter, **kwargs) self._static_text = wx.StaticText(self._parent, size=wx.Size(width, -1)) if bold: make_bold(self._static_text) self._add_widget(self._static_text, label) - def _update(self, label): self._static_text.SetLabel(label); self._parent.Layout() + def _update(self, label): + if self._units: label += ' ' + self._units + self._static_text.SetLabel(label); self._parent.Layout() ######################################################################## # Text Box Form |