格式化数字列编辑框全部,
我想使用类似于数字编辑框的数字列编辑框,我想格式化它以显示日期。 但是,如以下示例所示,格式似乎没有以相同的方式被接受? 有人可以指出以下方法有什么问题吗?
// Using Number Col Edit Box <BR />nR = 7;
NEB1 = Number Col Edit Box("StartDate",Repeat(Today() - 30 * 24 * 60 * 60,nR));
NEB1 << set format(format("ddMonyyyy"));
NEB2 = Number Col Edit Box("StartDate",Repeat(Today(), nR ));
NEB2 << set format(format("ddMonyyyy"));
TB1 = Table Box(NEB1,NEB2);
NW = New Window("test",TB1);
// Using number edit box
numbox = Number Edit Box( 0 ,<< set format(format("ddMonyyyy")), << set(Today()));
NW1 = New Window( "Example", numbox ); 
回复:格式化数字 Col 编辑框这种指定格式的方法是原来的方法。 这是我们用来设置 Number Col Box 对象格式的方法。 我惊讶地发现较新的 Number Col Edit Box 对象仍在使用它。
回复:格式化数字 Col 编辑框@马克贝利,
谢谢 。 虽然这有效,但数字将在数字 col 编辑框上实现某种格式,而不是数字编辑框允许的更直观的格式,这并不直观。 我会将其添加到愿望清单中。
回复:格式化数字 Col 编辑框这是此消息如何工作的示例:
Names Default to Here( 1 );
now = Today();
then = now - In Days( 3 ) - In Hours( 5 );
before = then - In Days( 2 ) + In Hours( 3 );
New Window( "Format Number Col Edit Box",
Outline Box( "Dates",
Table Box(
String Col Box( "Event", { "First", "Second", "Third" } ),
nceb = Number Col Edit Box( "Date", { now, then, before } )
)
)
);
nceb << Set Format( 30, 100 );
我不知道你想要哪种日期格式,所以你可能必须尝试不同的整数才能得到你想要的。
回复:格式化数字 Col 编辑框对,协议数字编辑框和数字列编辑框不一样。 特别是, << 设置格式()这两个对象的消息不同。 根据脚本指南,此消息使用数字(代码)作为您要使用的对象的格式规范:
