我复制了几个帖子,可能对你有用。
-------------------------------
Arthur: Formatting variables(16 Jan 2003 09am:13:24)
Hi Guys, I have the following....
v := TfrMemoView.Create;
v.SetBounds(xNew, 104, dx, 18);
Howdo
I numeric fields at runtime. I've tried the following, but nothing happens.
v.Prop['DisplayFormat'] := '0.00'
any help would be apreciated.
TIA
Arthur
--------------------------------------------------------------------------------
Teo (21 Jan 2003 09:18:19)
Hello Arthur,
You could try FormatStr function for that. The second argument of the function would be the fieldname.
--------------------------------------------------------------------------------
gord knight (21 Jan 2003 20:40:15)
Hi Arthur
the DisplayFormat is not directly accessable
IMHO due to the peculiarities of its editor.
the actual prop for tfrmemoview is format and it is an integer value (result of several calculations) so you will never know the value.
Teo is right where adding the text to the memo
contents encloseit with a known Fr function.
[formatfloat(<formatmask>,<Numeric>)]
regards
gord
--------------------------------------------------------------------------------
Teo (21 Jan 2003 21:32:42)
There is a second option: if you want to set this at runtime, you could try a variable in the frMemo which you set like other variables. Ido
n't know if this works but it's worth the try.