Gtk2-Ex-NumAxis

 view release on metacpan or  search on metacpan

examples/currency-format.pl  view on Meta::CPAN


#------------------------------------------------------------------------------


{
  my @formats = (FMT_STANDARD,
                 FMT_COMMON,
                 FMT_SYMBOL,
                 FMT_NAME);

  my $combobox = Gtk2::ComboBox->new_text;
  $combobox->append_text ('FMT_STANDARD');
  $combobox->append_text ('FMT_COMMON');
  $combobox->append_text ('FMT_SYMBOL');
  $combobox->append_text ('FMT_NAME');
  $combobox->set_active (0);
  $controls_vbox->pack_start ($combobox, 0,0,0);
  $combobox->signal_connect (changed => sub {
                               my ($combobox) = @_;
                               $format = $formats[$combobox->get_active];
                               axis_update();
                             });
}

{
  my $button = Gtk2::CheckButton->new_with_label ('FMT_NOZEROS');
  $controls_vbox->pack_start ($button, 0,0,0);
  $button->signal_connect ('notify::active',
                           sub {
                             my ($button, $pspec) = @_;



( run in 2.483 seconds using v1.01-cache-2.11-cpan-8dfa8b56332 )