Print Page | Close Window

Undocumented Feature - Date/Time Picker?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=1102
Printed Date: 23 November 2024 at 4:45am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Undocumented Feature - Date/Time Picker?
Posted By: ianp
Subject: Undocumented Feature - Date/Time Picker?
Date 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.

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net