Name

movecombo —

DESCRIPTION

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

movecombo is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: code/Widget/movecombo.widget
Lines: 17


# Copyright 2005-2007 Interchange Development Group and others
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: movecombo.widget,v 1.4 2007-11-14 04:50:19 pajamian Exp $

CodeDef movecombo Widget 1
CodeDef movecombo Description Combo move
CodeDef movecombo Help Selects any/all of many options, puts in text box
CodeDef movecombo Multiple 1
CodeDef movecombo MapRoutine Vend::Form::movecombo
CodeDef movecombo_replace Widget 1
CodeDef movecombo_replace Description Combo move (one value)
CodeDef movecombo_replace Help Selects one of many options, puts in text box

Source: lib/Vend/Form.pm
Lines: 713

sub movecombo {
my ($opt, $opts) = @_;
my $name = $opt->{name};
$opt->{name} = "X$name";
my $usenl = $opt->{rows} > 1 ? 1 : 0;
my $only = $opt->{replace} ? 1 : 0;
$opt->{extra} .= qq{ onChange="addItem(this.form['X$name'],this.form['$name'],$usenl,$only)"}
          unless $opt->{extra} =~ m/\bonchange\s*=/i;

$opt->{rows} = $opt->{height} unless length($opt->{rows});
$opt->{cols} = $opt->{width} unless length($opt->{cols});

my $tbox = '';
my $out = dropdown($opt, $opts);

my $template = $opt->{o_template} || '';
if(! $template) {
  if($opt->{rows} > 1) {
    $template .= q(<textarea rows="{ROWS|4}" wrap="{WRAP|virtual}");
    $template .= q( cols="{COLS|20}" name="{NAME}">{ENCODED}</textarea>);
  }
  else {
    $template .= qq(<input type="text" size="{COLS||40}");
    $template .= qq( name="{NAME}" value="{ENCODED}">);
  }
}
$opt->{name} = $name;
$tbox = attr_list($template, $opt);

return $opt->{reverse} ? $tbox . $out : $out . $tbox;
}

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!