Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » LineEdit, EditFields, DocEdit » EditTime - how to change format?- [SOLVED]-EditField & Convert
Re: EditTime - Is it possible to change displayed format? [message #567 is a reply to message #565] Mon, 09 January 2006 20:13 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
::Format(Time(q))

- q is converted to Time and global Format(const Time&) is called.

However, this "standard" Format is a little but misleading in this case, as what you will really need is Format just for one type (Time). So it might more likely look like this:

Value MyTimeConvert::Format(const Value& q) const {
Time tm = q;
return ::Format("%d:%d:%d", tm.hour, tm.minute, tm.second);
}

Note that this Convert would crash (or fail the assert in debug mode) if Value non-convertible to Time is passed, but that is OK in this case (you are going to use it just for Time anyway).
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Trouble with EditTime
Next Topic: DocEdit code scrolling
Goto Forum:
  


Current Time: Sun Apr 28 17:03:39 CEST 2024

Total time taken to generate the page: 0.04618 seconds