Print Page | Close Window

Max Length of Input

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=5400
Printed Date: 28 September 2024 at 9:05am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Max Length of Input
Posted By: Fabian
Subject: Max Length of Input
Date Posted: 01 November 2006 at 11:10am
Hello
 
I do not find a property MaxLength to limit the # of characters when editing a string value. Do I miss something?
 
Thanks for a hint
Fabian


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6



Replies:
Posted By: farr02
Date Posted: 08 November 2006 at 5:35am
Hello,

I had the same problem in the MFC version of property-grid, but I don't know if my solution is suitable for the ActiveX version, too.
First I have created a new, CXTPPropertyGridItem-derived class and then I have overridden the OnSelect function as follows:

void MyGridItem::OnSelect()
{
    CXTPPropertyGridItem::OnSelect();  // call base class first
    if(GetInplaceEdit().GetSafeHwnd())
        GetInplaceEdit().SetLimitText(20);  // limit number of input chars to 20
}

'SetLimitText' is a member of MFC CEdit-class.

Bye
   Holger



Posted By: Fabian
Date Posted: 08 November 2006 at 11:14am
Hi farr02
 
Thanks a lot for your reply. I think this doesn't work for ActiveX. But Oleg told me, that MaxLength would be added in 10.4.
 
Thanks, Fabian


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6



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