File: optionmenu.e

package info (click to toggle)
entity 0.7.2-6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,352 kB
  • ctags: 5,272
  • sloc: ansic: 61,707; sh: 7,921; makefile: 732; perl: 399
file content (28 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<object>
  <window>
    <optionmenu>
      <menu>
        <menuitem label="1"/>
        <menuitem label="2" name="two"/>
        <menuitem label="threeee" name="three"/>
        <menuitem label="fore, it means duck in golf" selected="true"/>
      </menu>
    </optionmenu>
    <button label="select threeee" onclick="select_three"/>
    <button label="check threeee's selection" onclick="check_three"/>
  </window>
  <?perl

sub select_three
{
	my $item = enode("menuitem.three");
	$item->attrib("selected" => "true");
}
sub check_three
{
	my $menuitem = enode("menuitem.three");
	print ($menuitem->attrib("selected"), "\n");
}

  ?>
</object>