Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » About CExtGridCellDuration Collapse All
Subject Author Date
David Skok Jul 15, 2008 - 6:50 AM

By overriding IsItemVisible I limit display to minutes and seconds.  Is there a way for me to limit the maximum duration that can be set or even better keep the minutes field to a maximum of 2 digits when hours and days are off?   This is the best solution for me however another issue with CExtGridCellDuration is that in the case where I exclude hours and minutes it allows 8 digits of entry for minutes.  While I prefer the first solution I could deal with this however if a user enters a large number by mistake it is not possible to remove digits through either backspace or Del.  It is possible to clear the field by using the arrow key to select seconds then back to minutes then type a new number which clears the minutes field first.  This is not obvious to a user and needs some polishing.  Please take a look at it.


 


Thanks, Dave

Technical Support Jul 31, 2008 - 4:09 AM

We implemented the functionality you need. Now the duration control can limit the number of seconds that can be entered by user.

Added the following methods to the CExtDurationWnd class:
- SetMaxDuration
- GetMaxDuration
- OnQueryMaxDuration

In your particular case you want to limit the number of minutes by two digits. It means that the maximum duration value will be 99 minutes and 59 seconds. It is equal to 60*99 + 60 = 5999 seconds.

Now just specify this value in the following way:

m_wndDuration.SetMaxDuration( 5999 );


This feature will be available in the next release but if you need it immediately just send the corresponding email request to the support.

David Skok Aug 5, 2008 - 9:19 AM

Thanks, this works perfect for CExtDurationWnd.  How can I use it with CExtGridCellDuration in a grid?


 


Dave

Technical Support Aug 6, 2008 - 11:14 AM

We added this functionality to the CExtGridCellDuration as you requested:

SetMaxDuration()
GetMaxDuration()
OnQueryMaxDuration

it will be available in the new release or we can provide your with the updated code on your request.