Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - CommandBarComboBox  - lost focus
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CommandBarComboBox - lost focus

 Post Reply Post Reply
Author
Message
Kelbob View Drop Down
Newbie
Newbie


Joined: 06 April 2005
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kelbob Quote  Post ReplyReply Direct Link To This Post Topic: CommandBarComboBox - lost focus
    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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Kelbob View Drop Down
Newbie
Newbie


Joined: 06 April 2005
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kelbob Quote  Post ReplyReply Direct Link To This Post Posted: 07 April 2005 at 2:34am
Sorry forgot to put the language in. Its in c# using the Activex version
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.