3 ###################################################
6 ###################################################
9 <name>Variable Text Box</name>
10 <key>variable_text_box</key>
11 <import>from gnuradio.wxgui import forms</import>
12 <var_make>self.$(id) = $(id) = $value</var_make>
13 <make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
14 #set $win = 'self._%s_text_box'%$id
15 $win = forms.text_box(
16 parent=$(parent).GetWin(),
18 callback=self.set_$(id),
25 converter=forms.$(converver)(formatter=$formatter),
27 converter=forms.$(converver)(),
33 $(parent).GridAdd($win, $(', '.join(map(str, $grid_pos()))))
35 <callback>self.set_$(id)($value)</callback>
36 <callback>self._$(id)_text_box.set_value($id)</callback>
42 <hide>#if $label() then 'none' else 'part'#</hide>
45 <name>Default Value</name>
51 <name>Converter</name>
53 <value>float_converter</value>
57 <key>float_converter</key>
61 <key>int_converter</key>
65 <key>str_converter</key>
69 <key>eval_converter</key>
73 <name>Formatter</name>
80 <name>Grid Position</name>
92 This block creates a variable with a text box. \
93 Leave the label blank to use the variable id as the label.
95 Format should be a function/lambda that converts a value into a string or None for the default formatter.
97 Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
99 Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.