0dad3d826ba13d2efd395b540aeab494dc1742f6
[debian/gnuradio] / grc / data / grc_gnuradio / blocks / variable_text_box.xml
1 <?xml version="1.0"?>
2 <!--
3 ###################################################
4 ##Variable Text Box: a grc variable with key, value
5 ###################################################
6  -->
7 <block>
8         <name>Variable Text Box</name>
9         <key>variable_text_box</key>
10         <make>$value
11 _$(id)_control = grc_wxgui.text_box_control(
12         window=self.GetWin(),
13         callback=self.set_$(id),
14                 #if $label.eval
15         label=$label,
16                 #else
17         label=&quot;$id&quot;,
18                 #end if
19         value=$id,
20 )
21 #set $grid_pos = $grid_pos.eval
22 #if not grid_pos
23 self.Add(_$(id)_control)
24 #else
25 self.GridAdd(_$(id)_control, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos[3])
26 #end if</make>
27         <param>
28                 <name>Label</name>
29                 <key>label</key>
30                 <value></value>
31                 <type>string</type>
32         </param>
33         <param>
34                 <name>Default Value</name>
35                 <key>value</key>
36                 <value>0</value>
37                 <type>raw</type>
38         </param>
39         <param>
40                 <name>Grid Position</name>
41                 <key>grid_pos</key>
42                 <value></value>
43                 <type>grid_pos</type>
44         </param>
45         <doc>
46 This block creates a variable with a text box. \
47 Leave the label blank to use the variable id as the label.
48
49 Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
50         </doc>
51 </block>