格式化數字列編輯框全部,
我想使用類似於數字編輯框的數字列編輯框,我想格式化它以顯示日期。 但是,如以下示例所示,格式似乎沒有以相同的方式被接受? 有人可以指出以下方法有什麼問題嗎?
// 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 編輯框對,協議數字編輯框和數字列編輯框不一樣。 特別是, << 設置格式()這兩個對象的消息不同。 根據腳本指南,此消息使用數字(代碼)作為您要使用的對象的格式規範:
