StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
WinForms (How do I?)
»
DateBox clear value key
DateBox clear value key
Post Reply
Like
1
DateBox clear value key
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Victor Sousa
Victor Sousa
posted 16 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 21,
Visits: 236
I noticed the the F6 key clears the DateBox control and I don't see a property to set that value. What is the best way to set the "delete" key to clear the value?
Reply
Like
1
Replies
Ross L. Rooker, Sr.
Ross L. Rooker, Sr.
posted 14 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 153,
Visits: 462
Using the DELETE key would be good in the next build for me also. In the meantime I will add this to the tool tip to at least let the user know.
Reply
Like
1
Ivan George Borges
Ivan George Borges
posted 14 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
Hi Ross.
If you feel like it, you can use the workaround I have used.
Subclass the DateBox and add the following code to it:
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
Select Case keyData
Case Keys.Delete
'-- Delete key pressed, send an F6 to clear contents
Return MyBase.ProcessCmdKey(msg, Keys.F6)
End Select
Try
Return MyBase.ProcessCmdKey(msg, keyData)
Catch ex As Exception
'-- the DateBox will throw an exception if user use keys to add or subtract beyond the bounderies
' so in these cases we will just send Home key
Return MyBase.ProcessCmdKey(msg, Keys.Home)
End Try
End Function
Hope it helps.
Reply
Like
1
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
DateBox clear value key
Victor Sousa
-
16 Years Ago
Well, this property should be slightly exposed, but delete would...
Trent L. Taylor
-
16 Years Ago
The Delete key doesn't seem to do anything in the DateBox control. It...
Victor Sousa
-
16 Years Ago
I get that the datebox control is written from the ground up etc and...
Charles R Hankey
-
16 Years Ago
Wow...that is the first time I have heard that. The number one thing...
Trent L. Taylor
-
16 Years Ago
Trent, i agree. The DateBox is much better for data entry. i'm just...
Victor Sousa
-
16 Years Ago
Trent, Will the week start date make in the next build ? :Whistling:...
Teddy Jensen
-
16 Years Ago
[quote]Just need a configurable clear key to make it perfect [/quote]...
Trent L. Taylor
-
16 Years Ago
Using the DELETE key would be good in the next build for me also. In...
Ross L. Rooker, Sr.
-
14 Years Ago
Hi Ross. If you feel like it, you can use the workaround I have used....
Ivan George Borges
-
14 Years Ago
Post Reply
Like
1
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search