Re: filechooser default button



On Mon, 2006-12-04 at 16:32 +0100, Jeffrey Ratcliffe wrote:
Hi all,

How do I set a filechooser up such that when I press the return key,
the save button is automatically pressed?

I've done a bit of googling, but found nothing relevant.

I think what you're after is set_default_response.  E.g.:

  my $file_chooser = Gtk2::FileChooserDialog->new(
    'Open',
    undef,
    'open',
    'gtk-cancel' => 'cancel',
    'gtk-ok'     => 'ok'
  );

  $file_chooser->set_default_response('ok');

Cheers
Grant




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]