Print Page | Close Window

Min/Max for Numeric and Double items

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=7646
Printed Date: 28 September 2024 at 7:27am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Min/Max for Numeric and Double items
Posted By: Osiris
Subject: Min/Max for Numeric and Double items
Date Posted: 23 July 2007 at 11:42am
Hi,

what would the best way to implement the functionality of setting a minimum and maximum value for a numeric or double property grid item? Any input outside the min/max constraints shall not be accepted.
Actually the item shall behave like an item with a slider or a spin button (if the user types in a value outside the slider/spin range, it will be rejected) but I dont want to have such a button.

The solution I'm thinking of is to derive on of the XTPPropertyGridInplaceEdit or the XTPGridItemNumber/Double classes.

Is there another (maybe smarter) way?

Thanks in advance
Stefan



Replies:
Posted By: Oleg
Date Posted: 24 July 2007 at 2:22am
Hello,
 
You can catch XTP_PGN_ITEMVALUE_CHANGED message and update value, or XTP_PGN_EDIT_CHANGED and change value while user edit it.


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