I'm searching for a possible method to only allow numeric input in a Gtk::Entry widget, without relying on SpinButtons. The matter is, I found a template for this (link), but it just won't work. I can compile it along my other code, but if I want to declare an instance with
NumericEntry<int> int_entry(1,0,10);
it tells me
expected ‘,’ or ‘...’ before numeric constant
The second part is, that I have no clear idea how to pack this entry, because I get a
can't convert to widget
error when using
functionname.pack_start(int_entry())
I guess there is a stupid error an my part (bad combination of C++ and Gtkmm newbie), so any help is appreciated.