items是用addobject加入的
savetofile只能保存str
怎样正确序列化对象?
savetofile只能保存str
怎样正确序列化对象?
解决方案 »
- CreateFile在win7下不能创建文件
- '[' expected but end of file found错误,请高手进来帮忙
- 请教一下,能否获取以canvas输出的文字?
- 一个不明白的错误提示?
- 急等 关于动态创建ODBC连接ACCESS
- 16进制数的字符串显示,及 00111111EA09 在LABEL.CAPTION中显示为00111111EA09==急
- 如何在delphi里面调用其他的exe程序???
- 基于oracle10g的信息查询系统用什么做前端开发比较好?
- 请教个Delphi检验码问题
- Delphi 下的Rave Designer启动失败?!
- adoquery 如何查询数据库
- Delphi的问题
那就用TWriter试试吧!
{
string value = "";
int itemCount = ListBox1.Items.Count;
if (ListBox1.Items.Count > 0)
{
if (ListBox1.SelectedIndex >= 0)
{
for (int i = 0; i < itemCount; i++)
{
if (ListBox1.Items[i].Selected)
{
ListBox2.Items.Add(ListBox1.Items[i]);
}
}
for (int i = 0; i < itemCount; i++)//这个循环需要注意itemCount;下面每删除一个item,listbox的item数量就会少一个,所以此
{ //处不能使用 ListBox1.Items.Count!!!否则会删除不彻底!!!
ListBox1.Items.Remove(ListBox1.SelectedItem);
}
}
else
{
value = "alert('请在右侧选择科室!');";
ScriptManager.RegisterClientScriptBlock(UpdatePanel1, this.GetType(), "key", value, true);
}
}
else
{
value = "alert('右侧无科室!');";
ScriptManager.RegisterClientScriptBlock(UpdatePanel1, this.GetType(), "key", value, true);
}
}
ReadComponentResFile
试一下,保存tcompnent及其属性