Print Page | Close Window

Retaining Focus

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=6908
Printed Date: 19 June 2025 at 1:14am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Retaining Focus
Posted By: LittleJK
Subject: Retaining Focus
Date Posted: 17 April 2007 at 3:57pm
Hi, we have a command bar that contains a combo box in which we want to keep the focus on the text inside the combo box whenever we hit enter. Currently when we hit enter it loses focus and then you have to click inside the drop down again. Is there anyway like using control notify event to keep the focus? We are using 10.42... possibly 11.1 will do the job?

Thanks



Replies:
Posted By: Oleg
Date Posted: 18 April 2007 at 1:26am
Hello,
try this
 
Private Sub CommandBars_CommandBarKeyDown(CommandBar As XtremeCommandBars.ICommandBar, KeyCode As Long, Shift As Integer)
    If KeyCode = 13 And Not CommandBar.SelectedControl Is Nothing Then
        If CommandBar.SelectedControl.Type = xtpControlComboBox Then
            KeyCode = 0
        End If
    End If
End Sub


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: LittleJK
Date Posted: 18 April 2007 at 10:04am
Thanks... we'll see if that works out. 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net