Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - Undocumented Feature - Date/Time Picker?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Undocumented Feature - Date/Time Picker?

 Post Reply Post Reply
Author
Message
ianp View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 19 December 2003
Location: United Kingdom
Status: Offline
Points: 119
Post Options Post Options   Thanks (0) Thanks(0)   Quote ianp Quote  Post ReplyReply Direct Link To This Post Topic: Undocumented Feature - Date/Time Picker?
    Posted: 25 August 2004 at 3:55am

If I add an item as per the Visual Basic example:

   Set Item = Category.AddChildItem(PropertyItemDate, "DateItem", "26/01/2004")
Then the propertygrid contains an item with a Date/Time Picker

In my app, I dynamically add items from an ado recordset
   Set Item = Category.AddChildItem(rs!PropertyItemType, rs!PropertyItemTitle, rs!PropertyItemValue)
   Item.Flags = rs!PropertyItemFlags

' Which, for a date field equates to:
'   Set Item = Category.AddChildItem(PropertyItemDate, "Date Created", "26/01/2004")
'   Item.Flags = ItemHasEdit

However, the item in the propertygrid simply contains a date mask without the Date/Time Picker.

Further investigation revealed an undocumented PropertyItemFlags constant which does not appear in the help or the object browser.

Const ItemHasDTPicker = 5
' The constant name is mine, not CodeJocks

In order to use the date/time picker it appears that, after adding adding a PropertyItemDate child item, you must either
a) Not set the PropertyItemFlags (the control will automatically set the flags to 5), or
b) Set the PropertyItemFlags = 5
Both elicit the same results.

 



Edited by ianp
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.152 seconds.