Re: DataBinding.Format still the only way to format Textbox text?
Charlotte Foust <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <F55048AF7E974F429BB24597D7355EEA4B9BFC@INFOSERVER04.infostat.local> |
What about creating a custom version of the control with those properties built in? Then just use the custom control class when you want that format. Charlotte Foust -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]] On Behalf Of Phil Sayers Sent: Monday, May 07, 2007 11:52 AM To: [email protected] Subject: Re: [DOTNET-WINFORMS] DataBinding.Format still the only way to format Textbox text? subclass TextBox. call it DateTimeTextBox add a FormatString Property shadow the .Text property to return a DateTime type beyond that...i'd be into Parse & Format handlers -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]]On Behalf Of Pardee, Roy Sent: Monday, May 07, 2007 2:49 PM To: [email protected] Subject: [DOTNET-WINFORMS] DataBinding.Format still the only way to format Textbox text? Hey All, I'm coming back to winforms after a long hiatus, and now doing 2.0. Back in the 1.1 days if I bound a Textbox.Text property to a DateTime & I didn't want the time portion displayed, I'd have to handle the appropriate DataBinding.Format event. Is that still the case in 2.0, or is there some new cool way of specifying a display/input format for that? Thanks! -Roy Roy Pardee Research Analyst/Programmer Group Health Center For Health Studies (Cancer Research Network) (206) 287-2078 Google Talk: rpardee