Print Page | Close Window

CComboBox::LimitText(..) in CXTPControlComboBox?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=7153
Printed Date: 13 November 2025 at 2:02am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CComboBox::LimitText(..) in CXTPControlComboBox?
Posted By: Ashok
Subject: CComboBox::LimitText(..) in CXTPControlComboBox?
Date Posted: 16 May 2007 at 9:27am

Hai

What is the equivalent for CComboBox::LimitText(..) in CXTPControlComboBox?




Replies:
Posted By: Oleg
Date Posted: 17 May 2007 at 8:42am
Hi,
 
you can override SetRect method and call
 
GetEditCtrl()->LimitText();


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


Posted By: Ashok
Date Posted: 18 May 2007 at 6:51am
But handle to the window is giving problem


Posted By: Ashok
Date Posted: 14 June 2007 at 4:27am
Hi,
   Do you have samples for that?


Posted By: Oleg
Date Posted: 15 June 2007 at 4:51am
https://forum.codejock.com/forum_posts.asp?TID=7358 - https://forum.codejock.com/forum_posts.asp?TID=7358

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


Posted By: Ashok
Date Posted: 18 June 2007 at 2:55am
Hi,
  That example is not suitable for CXTPControlComboBox.Can you please give me the exact sample for CXTPControlComboBox with LimitText(..).


Posted By: Oleg
Date Posted: 18 June 2007 at 3:19am
Hi,
 
All you need is replace CXTPControlEdit to CXTPControlComboBox:
 
class CMyControlComboBox: public CXTPControlComboBox
{
 DECLARE_XTP_CONTROL(CMyControlComboBox)
 void SetRect(CRect rcControl);
};
IMPLEMENT_XTP_CONTROL(CMyControlComboBox, CXTPControlComboBox)
void CMyControlComboBox::SetRect(CRect rcControl)
{
 CXTPControlComboBox::SetRect(rcControl);
 if (m_pEdit->GetSafeHwnd())
 {
  m_pEdit->SetLimitText(3);
 }
}


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


Posted By: Ashok
Date Posted: 18 June 2007 at 3:36am
Hi Oleg,
   It works. Many Thanks.



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