资源文件再次 [英] Resource file again

查看:58
本文介绍了资源文件再次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中添加了一个资源文件,用于存储按钮的标题和

标签..

如何使用此资源文件动态分配按钮

和标签?

解决方案

艾伦,


什么应用类型是 - 赢还是网络?

-

Stoitcho Goutsev(100)


" Alan T" < al ************* @ yahoo.com.auwrote in message

news:u7 ************** @ TK2MSFTNGP03.phx.gbl ...


>我在项目中添加了一个资源文件,用于存储按钮标题
和标签..

如何利用这个资源文件动态分配到

按钮和标签?



这是一个Windows应用程序。

我想要的是将字符串动态存储到表单的标签和

buttons''caption。


如果我们想用其他

语言将应用程序国际化,这非常有用。


" Stoitcho Goutsev (100)" < 10*@100.com在留言中写道

新闻:O9 ************** @ TK2MSFTNGP05.phx.gbl ...


Alan,


它是什么类型的应用程序 - win或web?


-

Stoitcho Goutsev(100)

" Alan T" < al ************* @ yahoo.com.auwrote in message

news:u7 ************** @ TK2MSFTNGP03.phx.gbl ...


>>我在项目中添加了一个资源文件,用于存储按钮标题和标签。 。
如何利用这个资源文件动态分配到
按钮和标签?




Alan,


最简单的方法是打开表单的本地化。只需将

表单'的Localizable属性设置为* true *即可。一旦你这样做了所有的形式和

形式'的控件属性,如文本,大小,位置等将转到

资源文件,设计师将生成从那里加载它们的代码来自

。如果你想使用你自己的资源文件我恐怕你需要阅读价值并自己设置控件。


Anoither解决方案是使用应用程序设置来存储

值。在设计器中选择一个控件,然后从属性窗口中显示

展开应用程序设置。节点,这是第一个在顶部。你

可以选择PropertyBinding collcection的任何控制属性,你

也可以选择该属性是应该进入用户还是全局

(应用程序设置。

-

HTH

Stoitcho Goutsev(100)

" Alan T" < al ************* @ yahoo.com.auwrote in message

news:%2 ************** ** @ TK2MSFTNGP05.phx.gbl ...


这是一个Windows应用程序。

我想要的是动态存储字符串形式''的标签和

按钮''标题。


如果我们想要将应用程序国际化,请使用其他

语言。


" Stoitcho Goutsev(100)" < 10*@100.com在留言中写道

新闻:O9 ************** @ TK2MSFTNGP05.phx.gbl ...


> Alan,

它是什么类型的应用程序 - win或web?

-
Stoitcho Goutsev( 100)

Alan T < al ************* @ yahoo.com.auwrote in message
新闻:u7 ************** @ TK2MSFTNGP03.phx。 gbl ...


>>>我在项目中添加了一个资源文件,用于存储按钮标题
和标签..
如何利用此资源文件动态分配到
按钮和标签?





I added a resource file into my project, to store the caption of buttons and
labels..
How do I make use of this resource file to dynamically assign to the buttons
and labels ?

解决方案

Alan,

What type of application is it - win or web?
--
Stoitcho Goutsev (100)

"Alan T" <al*************@yahoo.com.auwrote in message
news:u7**************@TK2MSFTNGP03.phx.gbl...

>I added a resource file into my project, to store the caption of buttons
and labels..
How do I make use of this resource file to dynamically assign to the
buttons and labels ?



It is a Windows application.
What I want is to dynamically store the string to the form''s label and
buttons''caption.

This is useful if we want to internationalize the application with other
language.

"Stoitcho Goutsev (100)" <10*@100.comwrote in message
news:O9**************@TK2MSFTNGP05.phx.gbl...

Alan,

What type of application is it - win or web?
--
Stoitcho Goutsev (100)

"Alan T" <al*************@yahoo.com.auwrote in message
news:u7**************@TK2MSFTNGP03.phx.gbl...

>>I added a resource file into my project, to store the caption of buttons
and labels..
How do I make use of this resource file to dynamically assign to the
buttons and labels ?




Alan,

The easiest would be to turn on the localization for the form. Just set the
form''s Localizable property to *true*. Once you do this all the form and
form''s controls properties such as Text, Size, Location, etc will go to a
resource file and the designer will generate the code to load them from
there. If you want to use your own resource file I''m afraid you need to read
the values and set the controls by yourself.

Anoither solution would be to use the application settings for storing the
values. In the designer select a control and then from the property window
expand the "Application Settings" node, which is the first on the top. You
can choose any control property form the PropertyBinding collcection and you
can also choose whether the property should go in the user or global
(application) settings.
--
HTH
Stoitcho Goutsev (100)
"Alan T" <al*************@yahoo.com.auwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...

It is a Windows application.
What I want is to dynamically store the string to the form''s label and
buttons''caption.

This is useful if we want to internationalize the application with other
language.

"Stoitcho Goutsev (100)" <10*@100.comwrote in message
news:O9**************@TK2MSFTNGP05.phx.gbl...

>Alan,

What type of application is it - win or web?
--
Stoitcho Goutsev (100)

"Alan T" <al*************@yahoo.com.auwrote in message
news:u7**************@TK2MSFTNGP03.phx.gbl...

>>>I added a resource file into my project, to store the caption of buttons
and labels..
How do I make use of this resource file to dynamically assign to the
buttons and labels ?





这篇关于资源文件再次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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