end;

下面的示例展示了如何在你的窗体上用 ListBox 控件加载和保存 strings:

Delphi:
  Listbox1.Items.LoadFromFile(’c:\temp\MyListBoxItems.txt’,TEncoding.UTF8)
  ListBox1.Items.SaveToFile(’MyListBoxItems.txt’,TEncoding.UTF8);

C++Builder:
  ListBox1->Items->LoadFromFile("c:\\temp\\MyListBoxItems.txt", TEncoding::UTF8);
  ListBox1->Items->SaveToFile("c:\\temp\\MyListBoxItems.txt",TEncoding::UTF8);

这是上面这个 Delphi 例子程序的屏幕截图:

Tiburon 支持 Unicode 的 LoadFromFile, SaveToFile

使用 Tiburon,现在我的 Delphi 和 C++ Demo 程序可以在列表框、编辑框和标签上使用 Uincode 字符了,而且我也可以直接在硬盘上读写 Unicode 的 strings。

原文地址:http://blogs.codegear.com/davidi/2008/07/15/38898/

翻译:峪飞鹰

转载请注明出处!

相关文章:

  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
  • 2021-12-08
  • 2022-12-23
  • 2021-07-11
猜你喜欢
  • 2021-10-04
  • 2021-12-06
  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2022-01-08
相关资源
相似解决方案