Re: GtkComboBox signals
- From: Stefan Salewski <mail ssalewski de>
- To: Pekka Riikonen <priikone iki fi>, gtk-app-devel-list gnome org
- Subject: Re: GtkComboBox signals
- Date: Wed, 28 Oct 2015 13:43:39 +0100
On Sun, 2015-10-25 at 18:35 +0100, Pekka Riikonen wrote:
second one with "changed" signal on the combobox isn't because the
signal
is emitted also when typing into the entry. It effectively becomes
impossible to determine whether item was typed in or selected from the
list.
OK, no answer from experts yet.
I can remember that I used this Ruby code for that task:
@changed_handler_id = self.signal_connect('changed') {|w|
if @pda
if w.active != -1
i = w.active_text.to_i
if i != (@major ? @pda.schem.major_grid : @pda.schem.minor_grid)
if @major then @pda.schem.major_grid = i else @pda.schem.minor_grid = i end
@pda.schem.active_grid = i if radio_button.active?
@pda.redraw
end
end
end
}
So active property of
https://developer.gnome.org/gtk3/stable/GtkComboBox.html#GtkComboBox--active
can be used to detect if an item was selected from list.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]