On Mon, 16 Sep 2013 06:24:18 GMT, det wrote:

hi,

i have yet another issue i cannot figure out. it is probably purely GTK related, rather than gtkD, but i could not find it covered/explained anywhere. i would greatly appreciate a bit of help here.

so i want to create this dialog for checked input (see code example below), for starters just an int. i don't want to allow the user to leave the Entry field with invalid input, e.g. a string. even the [OK] and [Cancel] buttons shall be no way out. well, i managed to cope with (not) leaving using 'tab' key, but the [OK] and [Cancel] buttons will break my checked input - unless i display an error message as well. this is quite an ugly workaround and i rather do without.

... code ...

For the simple cases like mandating that the entry only accepts integers you can set the input purpose.

entry.setInputPurpose(InputPurpose.DIGITS);

PS: code highlighting works better if the code is between triple back-ticks.