【发布时间】:2017-08-17 21:09:22
【问题描述】:
早安,伙计们。 我有一个 Gtk.Entry ,我需要在按下某个键时按下事件。 用https://valadoc.org/gtk+-3.0/Gtk.Widget.key_press_event.html探测
但是我不知道怎么用。
kilometer.unit_entry.key_press_event.connect (capture_kilometer);
private bool capture_kilometer (Gdk.EventKey key )
{
number_to_calc = kilometer.get_text ();
calc_kilometer_all ();
}
请帮帮我
【问题讨论】: