The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Quiq::Html::Widget::SelectMenuColor - Selectmenü mit farbigen Einträgen

BASE CLASS

Quiq::Html::Widget::SelectMenu

ATTRIBUTES

Siehe Basisklasse. Zusätzlich:

applyColorsTo => 'fg' | 'bg' (Default: 'fg')

Wende die Farben (siehe Attribut colors) auf den Vordergrund oder auf den Hintergrund an.

colors=> \@colors (Default: [])

Liste der Farbwerte für die Elemente der Auswahlliste. Es sind alle Farbwerte (außer ($r,$g,$b)) möglich, die der Konstruktor der Klasse Quiq::Color akzeptiert.

undefIf => $bool (Default: 0)

Wenn wahr, liefere undef als Widget-Code.

EXAMPLES

Erzeuge Auswahlmenü mit farbigen Texten:

  $w = Quiq::Html::Widget::SelectMenuColor->new(
      id => 'smc1',
      name => 'smc1',
      applyColorsTo => 'fg',
      options => [qw/Apfel Birne Orange/],
      colors => [qw/ff0000 006400 ff8c00/],
      value => 'Birne',
  );
  print $w->html($h);

Erzeuge Auswahlmenü mit farbigen Hintergründen:

  $w = Quiq::Html::Widget::SelectMenuColor->new(
      id => 'smc1',
      name => 'smc1',
      applyColorsTo => 'bg',
      options => [qw/Apfel Birne Orange/],
      colors => [qw/ff0000 006400 ff8c00/],
      value => 'Birne',
  );
  print $w->html($h);

METHODS

Konstruktor

new() - Konstruktor

Synopsis

  $e = $class->new(@keyVal);

Objektmethoden

html() - Generiere HTML-Code

Synopsis

  $html = $e->html($h);
  $html = $class->html($h,@keyVal);

VERSION

1.191

AUTHOR

Frank Seitz, http://fseitz.de/

COPYRIGHT

Copyright (C) 2020 Frank Seitz

LICENSE

This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.