This is a migrated thread and some comments may be shown as answers.

ShapedForm key events

1 Answer 50 Views
ShapedForm
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 05 Dec 2017, 10:20 AM

Hello,

 

I am using a ShapedForm (without TitleBar control) instead of normal Form, but now it seems like my default Form events like keypress, keydown etc. are not working anymore.

How can I get these to work? I want the form to close when a user presses Escape. And possibly Minimize form when a user presses e.g. F10.

Do I need a Titlebar? If so, how can I make this titlebar Blue instead of grey? Plus some caption on it as well of course.

 

 

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 06 Dec 2017, 07:26 AM
Hello Martin,

You need to set the KeyPreview property to true. This way the event will fire even if a control on the form is focused.

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ShapedForm
Asked by
Martin
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or