将增加的值添加到列表框中 [英] add incremented values into listbox

查看:107
本文介绍了将增加的值添加到列表框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi


i有一个组合框和文本框我正在从组合框中获取值并将其递增到插入文本框并在列表框中显示所有结果的值。 />


i我使用按钮来填充所有这些。



例如:

combobox有价值:123

文本框有价值:4

然后列表框会显示:

124

125

126

127



简单。

增量组合框值123使用文本框时间4并将其显示到列表框。

解决方案

将for循环更改为此;

  for  int  i =  0 ; i <  k; i ++)
{
SerialBox.Items.Add(j + i + 1 );
}







祝你好运,

OI


hi
i have a combobox and textbox i am geting value from combobox and incrementing it to the value which is inserted on text box and showing all the result on list box.

i am using button to populate all this.

eg:
combobox have value : 123
text box have value : 4
then list box will show:
124
125
126
127

simply.
increment combo box value"123" with textbox time "4" and show it to list box.

解决方案

Change your for loop to this;

for (int i = 0; i < k; i++)
{
    SerialBox.Items.Add(j + i + 1);
}




Good luck,
OI


这篇关于将增加的值添加到列表框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆