Page 1 of 1

Accelerator keys and default buttons

Posted: Wed Sep 08, 2004 02:51
by PeterNewman
I've done a quick search, please excuse me if I missed it.

CE, is there a plan to add "accelerator keys" to your GUI system?
Also, is there a plan (or a way I've missed) to set a "default" button, so when I pop up a dialog, they can hit enter for OK, Escape for the cancel, etc?

Thanks for the great GUI system CE, once again. :D

Accelerator keys and default buttons

Posted: Wed Sep 08, 2004 08:36
by CrazyEddie
I'll add accelerator keys to the TODO list. There are various ways you might implement this now. One method involves subscribing to keyboard events in a common parent window of all the widgets you want to assign keys to, though various potential issues do spring to mind.

You can implement the default enter for okay and escape for canel quite easily, if you subscribe to key down events for the main window of your dialog, check for these keys in the event args and react accordingly.

What the system really needs is an extended control interface for all widgets, allowing accelerators, tabbing between widgets, and things of this nature. Hopefully a lot of this will make the second beta :)

CE.