Print Page | Close Window

CommandBarComboBox - lost 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=2077
Printed Date: 08 July 2024 at 12:56am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CommandBarComboBox - lost focus
Posted By: Kelbob
Subject: CommandBarComboBox - lost focus
Date Posted: 06 April 2005 at 6:18am

Hi,

I have a CommandBarComboBox  with DropDownListStyle set to true.

1. When someone edits the text and then clicks off the control i want to set the text back to what it was previously. i.e. a Lost focus event.

2. Is there anyway to validate the users keystrokes when there are editing this combo box.

Thanks in advance.

JK




Replies:
Posted By: Oleg
Date Posted: 06 April 2005 at 10:29am

1, you can update it in Handler

void CMainFrame::OnUpdateEditState(CCmdUI* pCmdUI)
{
 CXTPControlComboBox* pStateCombo = DYNAMIC_DOWNCAST   (CXTPControlComboBox, CXTPControl::FromUI(pCmdUI));

 if (pStateCombo && !XTPMouseManager()->IsTrackedLock())
 {
     pStateCombo->SetEditText(m_strProperies);

  }

 }

}

 

 

2. See CustomThemes sample, you can override Edit control and validate input (or use Masked text)



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


Posted By: Kelbob
Date Posted: 07 April 2005 at 2:34am
Sorry forgot to put the language in. Its in c# using the Activex version


Posted By: Oleg
Date Posted: 07 April 2005 at 1:17pm
Use same code for ActiveX. catch Update event, set text for Edit.

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



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