Hi,
Is there any chance in near future (read: next version ) we could have a PropertygridItem Time ? I used propertygrid for all my settings/options, now only time is kind of a problem...
What I tried myself:
- Using Setmask for this isn't an option. It looks poor with the use of underscores and you have to do a lot of checking for entered Time value.
- Should look something like propertygriditemDATE... Yes, I could use DateTimePicker for this... So tried putting DateTimePicker inside picturebox and set it to xtpPickerTime. Yes, pops up nicely on correct position. Entering values, switching between hh & mm & ss very easely, now we are on the right track. Well, almost
- Since there's no event that I could use to update propertygriditem with Time value. There is always some hack possible but there are limits. Would like to use ENTER key but with no event available this is going to be difficult...
- Ok, add pushbutton to picturebox. Well doesn't look so nice but at least it is working OK.
- Why not hide the "update button"? OK, I only have to press ENTER to update. Design is still acceptable so used this option to proceed with
- Hiding picturebox, when propertygriditem has been updated AND when no value has been "entered"... Selection_Changed event will take care of this. And yes it does (sometimes an event to many but who cares, picturebox shows anyway when InplaceButton is released...
- OK, looking good for now... Only one thing left, mousewheel and scrollbar doesn't make picturebox invisible. Strange though, Selection_Changed event is fired when I resize propertygrid huhhhhh ???? Well I didn't get around this without a hack: I need to determine if the TopMost PropertygridItem has been changed and I had to use a timer for this So whenever mousewheel or scrollbar is used TopMostIndex will change and picturebox will be made invisible.
- See test below. Ideas are always welcome of course and maybe usefull whenever you are desperate for time propertygriditem (Like I am now)
To support: So, implementing a "real" Time propertygriditem isn't that hard for you guys. I only had to use one hack
Update: 19-11-2010
- I changed few lines in order to setfocus to time for those who want to use keyboard and able to select time with arrow keys
- Just for fun I created a "File selector"
http://forum.codejock.com/uploads/3701/Test_PropertyGridTime_V1.zip - uploads/3701/Test_PropertyGridTime_V1.zip
Thanks a lot
------------- Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Zero replies is not an option....
|