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 General Discussion » Edit control with functionality similar to CExtDatePickerWnd Collapse All
Subject Author Date
Jeremy Ruth Dec 30, 2008 - 5:36 PM

I have the need for an Edit control that will have a 6 digit value (divided into 2 3-digit valus...xxxyyy).


What I’d like to be able to do is implement the same type of cursor movement that the CExtDatePickerWnd does (ie. the month, day and year fields are all separately edited and the up/down keys change the respective values).  Hopefully I am making sense.


In other words: I have a value of 108250 in the control.  If I click on any of 108, the ’108’ is highlighted and if I use the up or down keys, the value 108 will increment/decrement.  And if I click on any of 250, the ’250’ is highlighted and the up/down keys will increment/decrement just the 3 highlighted digits.  If I have to put some separator in there, that’s fine.  I am just looking for the same functionality that exists with each of the date fields in the CExtDatePickerWnd control.


This value is a date that is a special form of a Julian date.  CYYDDD where the C=0 for years prior to 2001, C=1 for years 2001 and beyond.  YY is the 2-digit year.  And DDD is the day of the year.  I want to treat the CYY value as 1 field and the DDD value as a separate field.  Does this make sense?  If so, is there a way to achieve this?


Thank you.

Technical Support Jan 2, 2009 - 3:15 PM

We have the CExtDurationWnd class which implements the duration input control. This control is not based on the edit control. The groups of digits called input fields in this control are coded from scratch. It’s not difficult to code a class derived from duration control and make it containing different fields. The CExtDateTimeWnd class is such kind of control. It uses field input features provided by the CExtDurationWnd class for date-time input. The Prof-UIS 2.85 will contain new CExtDurationWnd-based control for longitude/latitude input:

http://www.prof-uis.com/download/forums/GeoControls_BIN.zip

So, you can use the source code of the CExtDateTimeWnd class as the sample.

You can also use the masked edit control which is introduced in Prof-UIS 2.84. It supports the field selection mode but all the field digits will not be highlighted during input.