3 ###################################################
4 ##Variable Static Text:
5 ## a gui static text form
6 ###################################################
9 <name>Variable Static Text</name>
10 <key>variable_static_text</key>
11 <import>from gnuradio.wxgui import forms</import>
12 <var_make>self.$(id) = $(id) = $value</var_make>
13 <make>self.$(id)_static_text = forms.static_text(
16 callback=self.set_$(id),
23 converter=forms.$(converver)(formatter=$formatter),
25 converter=forms.$(converver)(),
28 #set $grid_pos = $grid_pos()
30 self.Add(self.$(id)_static_text)
32 self.GridAdd(self.$(id)_static_text, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos[3])
34 <callback>self.set_$(id)($value)</callback>
35 <callback>self.$(id)_static_text.set_value($id)</callback>
41 <hide>#if $label() then 'none' else 'part'#</hide>
44 <name>Default Value</name>
50 <name>Converter</name>
52 <value>float_converter</value>
56 <key>float_converter</key>
60 <key>int_converter</key>
64 <key>str_converter</key>
68 <name>Formatter</name>
75 <name>Grid Position</name>
81 This block creates a variable with a static text form. \
82 Leave the label blank to use the variable id as the label.
84 Format should be a function/lambda that converts a value into a string or None for the default formatter.
86 Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.