I am playing with tcl gridplus date control, and would like to create date selector entry.
It should have default value of today, and European date format: dd.mm.yyyy
I tried:
source ../bin/common/gridplus.kit
package requ开发者_StackOverflow中文版ire Tk
package require gridplus
namespace import gridplus::*
# Create date delector
gridplus date .dt -selecttoday 1 -dateformat "eu" {
{DT .dt}
}
pack .dt
As a result I got date selector that: - do not show default value; - Show date in US format mm/dd/yyyy
Any ideas how to fix it?
A little bit of experimentation shows that if you include the command:
gridplus set -dateformat eu
that you should end up with the correct date format.
There currently isn't a way to set a default value for a "date" item. It is neccessary to use a gpset command...
gpset .dt,dt [clock format [clock seconds] -format "%d.%m.%Y"]
...after creating the "date" ietm (assuming "eu" date format).
I am adding options to specify default values in the next (2.7) release - Due in the next week or two.
Best Regards,
=Adrian=
(GRIDPLUS developer)
精彩评论