Print Page | Close Window

Limit string length / Input mask

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=7052
Printed Date: 05 May 2024 at 5:07pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Limit string length / Input mask
Posted By: ABuenger
Subject: Limit string length / Input mask
Date Posted: 05 May 2007 at 7:25pm
I need to limit the length of a string item but  pItem->GetInplaceEdit().SetLimitText(...) does not work, the CEdit is not yet created in OnInitDialog or OnShowWindow.

How can I limit the string length?

I also need to limit the maximum number of digits of an integer item.

I've also tried to set a mask for a double item but that doesn't work.
"A" and "0" does not allow the decimal separator ("," or ".") to be entered and if I set the mask to "&" and then enter "1,5" I get an (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.

Also I don't want the prompt character ("_") to be displayed and the mask to be drawn in a gray shade. I also would like the mask to be displayed always and not only when the item is selected.


Is:



Should be:




-------------
Codejock support



Replies:
Posted By: Oleg
Date Posted: 07 May 2007 at 8:14am
Hello,
 
To limit text call
 
pItem->GetValueMetrics()->m_nMaxLength = xxx;


-------------
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