奇怪的标签行为 [英] Strange Label behavior
问题描述
有人可以向我解释这个......?
添加一个Label和一个Button来形成。
将Label的RightToLeft设置为True。
试试这个
Label1.Text =" 12345。" ;;
展出你会看到
..12345
十进制跳到错误的一边
如果你这样做
Label1.Text = Label1.Text +" 00" ;;
在屏幕上你会看到
12345.00
它自己纠正了
呵呵?
提前致谢
Can someone explain this one to me ...?
Add one Label and one Button to form .
Set RightToLeft of Label to True.
try this
Label1.Text="12345.";
on display you will see
..12345
the decimal jumped to the wrong side
if you then do this
Label1.Text = Label1.Text + "00";
on screen you will see
12345.00
it corrected itself
huh?
Thanks in advance
推荐答案
我无法重现这一点。你能给我们一个代码示例来证明
错误吗?控件的位置是否重要。什么样的
Visual Studio(如果有的话)你在使用?
2006年11月23日星期四02:15:01 +0100,SLIMSHIM
< SL ****** @ discuss.microsoft.comwrote:
Hi,
I cannot reproduce this. Could you give us a code sample demonstrating
the error? Is the position of the controls important. What kind of
Visual Studio (if any) are you using?
On Thu, 23 Nov 2006 02:15:01 +0100, SLIMSHIM
<SL******@discussions.microsoft.comwrote:
有人可以向我解释一下......?
为表单添加一个Label和一个Button。
将Label的RightToLeft设置为True。
试试这个
Label1.Text =" ; 12345." ;;
显示你会看到
.12345
十进制跳到错误的一边
如果你这样做
Label1.Text = Label1.Text +" 00";
在屏幕上你会看到
12345.00
它自行更正
呵呵?
提前致谢
Can someone explain this one to me ...?
Add one Label and one Button to form .
Set RightToLeft of Label to True.
try this
Label1.Text="12345.";
on display you will see
.12345
the decimal jumped to the wrong side
if you then do this
Label1.Text = Label1.Text + "00";
on screen you will see
12345.00
it corrected itself
huh?
Thanks in advance
-
快乐编码!
Morten Wennevik [C#MVP]
--
Happy Coding!
Morten Wennevik [C# MVP]
I" m使用vs 2005
im使用c#
private void button1_Click(object sender,EventA rgs e)
{
label1.Text =" 12345。" ;;
}
这将是再现它
屏幕上的标签将显示
.12345
这只会在RightToLeft为True时发生
比你的时间磨一个磨坊!
" Morten Wennevik"写道:
I"m using vs 2005
i"m using c#
private void button1_Click(object sender, EventArgs e)
{
label1.Text = "12345.";
}
THIS WILL REPRODUCE IT
the label on screen will show
.12345
this will only happen if RightToLeft is True
thanx a mill for your time!
"Morten Wennevik" wrote:
我无法重现这一点。你能给我们一个代码示例来证明
错误吗?控件的位置是否重要。什么样的
Visual Studio(如果有的话)你在使用?
2006年11月23日星期四02:15:01 +0100,SLIMSHIM
< SL ****** @ discuss.microsoft.comwrote:
Hi,
I cannot reproduce this. Could you give us a code sample demonstrating
the error? Is the position of the controls important. What kind of
Visual Studio (if any) are you using?
On Thu, 23 Nov 2006 02:15:01 +0100, SLIMSHIM
<SL******@discussions.microsoft.comwrote:
有人可以向我解释这个......?
添加一个Label和一个Button来形成。
将Label的RightToLeft设置为True。
试试这个
Label1 .Text =" 12345。" ;;
显示你会看到
.12345
十进制跳到错误的一边
如果你这样做
Label1.Text = Label1.Text +" 00";
屏幕上你会看到
12345.00
它自行更正
呵呵?
提前付款
Can someone explain this one to me ...?
Add one Label and one Button to form .
Set RightToLeft of Label to True.
try this
Label1.Text="12345.";
on display you will see
.12345
the decimal jumped to the wrong side
if you then do this
Label1.Text = Label1.Text + "00";
on screen you will see
12345.00
it corrected itself
huh?
Thanks in advance
-
快乐编码!
Morten Wennevik [C#MVP]
--
Happy Coding!
Morten Wennevik [C# MVP]
对不起,我还是无法重现它。使用标签,AutoSize为true或false,
LeftToRight是或否。在按钮期间设置文本时单击它
始终显示12345。与。最后。
这是发生在新项目还是只有一个或几个?
On Thu,2006年11月23日09:04 :01 +0100,SLIMSHIM
< SL ****** @ discuss.microsoft.comwrote:
Sorry, I still can''t reproduce it. Using a Label, AutoSize true or false,
LeftToRight Yes or No. When setting the text during button click it
always displays "12345." with . at the end.
Does this happen in new projects or just one or a few?
On Thu, 23 Nov 2006 09:04:01 +0100, SLIMSHIM
<SL******@discussions.microsoft.comwrote:
我用m vs 2005
im使用c#
private void button1_Click(object sender,EventArgs e)
{
label1.Text =" 12345。" ;;
}
这将重现它
屏幕上的标签会显示
.12345
只有当RightToLeft为True时才会发生这种情况
比你的时间磨一个磨坊!
Morten Wennevik写道:
I"m using vs 2005
i"m using c#
private void button1_Click(object sender, EventArgs e)
{
label1.Text = "12345.";
}
THIS WILL REPRODUCE IT
the label on screen will show
.12345
this will only happen if RightToLeft is True
thanx a mill for your time!
"Morten Wennevik" wrote:
>
我无法重现这一点。你能给我们一个代码样本来证明错误吗?控件的位置是否重要。你使用什么样的Visual Studio(如果有的话)?
2006年11月23日星期四02:15:01 +0100,SLIMSHIM
< SL *** ***@discussions.microsoft.comwrote:
>Hi,
I cannot reproduce this. Could you give us a code sample demonstrating
the error? Is the position of the controls important. What kind of
Visual Studio (if any) are you using?
On Thu, 23 Nov 2006 02:15:01 +0100, SLIMSHIM
<SL******@discussions.microsoft.comwrote:
有人可以向我解释这个......?
添加一个标签和一个按钮形成。
将Label的RightToLeft设置为True。
试试这个
Label1.Text =" 12345.";
显示你会看到
.12345
十进制跳到错误的一边
如果你然后这样做
Label1.Text = Label1.Text +" 00";
在屏幕上你会看到
12345.00
它自己纠正了
呵呵?
提前致谢
Can someone explain this one to me ...?
Add one Label and one Button to form .
Set RightToLeft of Label to True.
try this
Label1.Text="12345.";
on display you will see
.12345
the decimal jumped to the wrong side
if you then do this
Label1.Text = Label1.Text + "00";
on screen you will see
12345.00
it corrected itself
huh?
Thanks in advance
-
快乐的编码!
Morten Wennevik [C#MVP]
--
Happy Coding!
Morten Wennevik [C# MVP]
-
快乐编码!
Morten Wennevik [C#MVP]
--
Happy Coding!
Morten Wennevik [C# MVP]
这篇关于奇怪的标签行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!