LOGIN    REGISTER    YOUR CART

homepage
VisualHint's blog
2007
Oct24

Trackbars for any numerical value in Smart PropertyGrid

This was a long time requested feature: being able to attach a trackbar feel to any type of numerical value. As a last minute surprise in SPG 2.5 (which is in beta), I implemented it for integers, floats, doubles and decimals (it’s ready for more but let’s see what you actually need in the future). The feel still needs a PropertyValidator attached to it so that it can have the minimum and maximum values. There is also a new attribute (TrackBarSettings) to set the Resolution (new notion for floating point numbers) the SmallChange and LargeChange properties.

Since at the same time, a customer had troubles with a property of type PointF and its associated TypeConverter, I updated the sample with such a property showing the new trackbar for the X and Y child properties. Here is a screenshot of this nice arrangement:

alt text

If you need the PointF TypeConverter, feel free to download it. It is simply based on its counterpart for the Point structure.