如何为文本框,按钮等控件提供快捷键 [英] How to provide shortcut keys for controls like text box,button

查看:59
本文介绍了如何为文本框,按钮等控件提供快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我需要为文本框和按钮等控件提供快捷键...

这是我不想去的用于tabspace或鼠标单击以进行特定控件..

通过快捷键我需要去specifeid控件(文本框,按钮)......


是有没有办法为控件提供切入键.....或内置属性值.....


任何anoe都可以帮助我解决这个问题。 ..

Hi all,

I need to provide shortcut keys for controls like text box and buttons etc...
That is i dont want to go for tabspace or mouse click for perticular controls..
By having shortcut keys i need to go for specifeid controls(textbox,button)...

Is there any way to provide shotcut keys for controls.....or built in property values.....


could any anoe help me out of this query...

推荐答案




对于按钮你可以改变标题:


& Save


因此,当您按下Alt + S时,将触发cmdsave_Click。在表格上..


对于TextBoxes,你必须编码..


REgards

Veena
Hi,

For Buttons You can Change the Caption:

&Save

So, cmdsave_Click will be fired, when you press "Alt + S" on the form..

For TextBoxes, you have to code..

REgards
Veena


如果你想让文本框或任何控件聚焦,用适当的快捷键和按键事件

If you want the textbox or any control to be on focus, with an appropriate shortcut key and keypress event

展开 | 选择 | Wrap | 行号


你好


首先设置表单属性Keypreview True

然后在表单中设置所有控件都有常规的TAbIndex


然后在Form keydown事件中
Hello

Firstly Set Forms Property Keypreview True
Then Set All Controls in the Form have regular TAbIndex

Then in Form keydown event
展开 | 选择 | 换行 | 行号


这篇关于如何为文本框,按钮等控件提供快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆