473,807 Members | 2,842 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Set Property for Controls by Name as a String

To make it easier for translators to convert my program to their local
language, I'm using XML files as translation dictionaries since its
much easier for deployment and production purposes.

This is a sample XML File:

<translation>
<language key="en_US" rtl="false">
<form1>
<button1>Subm it Form</button1>
<label1>Type your name here</label1>
</form1>
<form2>
<label1>About this Program</label1>
<button3>E&xi t</button3>
</form2>
</language>
</translation>

I'm open to any all suggestions regarding the data structure, but this
seems to do what I need.
Now with an XML parser, I have all the data in strings.

in a for each loop that iterates through the contents of the
<languagesub-tree's <form*sub-trees, how can I access the control
as a winform control?

pseudocode

for each form in language as winform
for each control in winform as generic-control
set generic-control.caption = string
.........

Any suggestions?

May 15 '07 #1
1 1494
I should probably add: I'm cycling through all forms then all controls
on that form, and comparing the name of the current control to a node
of the tree, and if it's a match, I'm assigning it the value. But this
is a huge waste of resources.

May 15 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2134
by: Roman | last post by:
I'm trying to create the form which would allow data entry to the Client table, as well as modification and deletion of existing data rows. For some reason the DataGrid part of functionality stops working when I include data entry fields to the form: I click on Delete or Edit inside of DataGrid and get this error: "Error: Object doesn't support this property or method" If I remove data entry fields from the form - DataGrid allows to...
15
2517
by: Mark Goldin | last post by:
I have main aspx page with a number of user controls. How can I create a global property that will be visible in every user control? Thanks
5
1949
by: RSH | last post by:
I havent been able to set a property from another class with out getting some sort of error. Can someone please tell me what I'm doing wrong here? Public Class Form1
13
7711
by: Bevan Arps | last post by:
I have a simple question, but one to which I haven't (after a whole bunch of Googling) been able to find an answer: Are there any guarantees to the order of PropertyInfo objects returned by a call to Type.GetProperties() ? To explain: I am writing utility package that is reliant on being able to process
4
1449
by: MLH | last post by:
Seeking code to ID & print all controls on all forms having a ValidationRule property set - but no ValidationText property setting. Perhaps some modification of the following procedure would do it? Private Sub ListControlsBttn_Click() '************************************************************************* ' Purpose: Run the Controls Collection for user-specified form. ' The controls collection is a form's default collection....
0
3269
by: Jeremy Chapman | last post by:
I have included below virtually all the code to a control I'm trying to build. My issue is that an array list property in my control does not get persisted properly to the aspx page code in design time. If I type the code in the aspx manually it does get parsed correctly though. This is an example of the aspx code that gets parsed correctly. For some reason, if I changed update the Tab property of the control through the GUI at design...
0
794
by: Nenefta | last post by:
Hi all, I would like to create something that should be fairly simple I guess, but I just might be taking a wrong road here or just don't know where to look for an answer. Please enlighten me! My wish: Two controls: First one (inherits Label) has a property with wich you can select any of the available Controls type Two on the same form. I would like to
7
1646
by: Nemisis | last post by:
Hi everyone, Can anyone tell me if it is possible to pass in a property of an object into a sub, and within that sub, find out the name of the item that was passed along with the property name?? Example would be ......Code Dim ObjA As New ObjectA
11
3973
by: Andrus | last post by:
I'm implementing entity object which should populate its properties from database when property is first referenced. In RDL reports I use object properties like MyObject.MyProperty MyObject is instance of MyEntity class. There is no MyProperty property in MyObject at design time.
10
1514
by: Rob | last post by:
I am reading a book that says that the "name" property can be altered only at design time and cannot be modified at runtime. Please explain this given the code below... If you click Button3... fred will appear as the Name of Button1, however, the handler for Button1 works still works as well... Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
0
9599
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10374
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10112
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9193
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6879
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3854
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.