Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
545
Button Clink on Hitting Enter Key
posted

Hello,

What I want:

I have one user control with couple of Text box controls and one Command button. I want that when user hit enter key then command button should be clicked.

How I am using this user control:

I have WinTilePanel and I am placing UltraTiles with code as follows

utTile = New UltraTile()
utTile.Name = "Name"
utTile.Caption = "Caption"

'Assigning User Control to UltraTile as follows

utTile.Control = UserControl

'Adding UltraTile to WinTilePanel

Me.utpWinTilePanel.Tiles.Add(utTile)

What I did for Button click:

User Control does not have AcceptButton Property like Windows Form does have it. So I declared property as follows.

Public Property AcceptButton As IButtonControl

Then I initialize with Command button

Me.AcceptButton = Me.btnCommand
What I happening:

After running Application when I hit enter, command button is not getting clicked.


Please let me know if I missing registering event or anything else.

Thanks
Imran