|
-
Oct 1st, 2003, 05:36 AM
#1
Thread Starter
Frenzied Member
KnownColour in local language
I've got the following code in my application. When I run it on my English PC (with English .NET Framework) the combo box populates with "Red", "Yellow", "Blue".
I was hoping that when I ran it on a German PC it would populate with "Rot", "Gelbe", "Blau". This doesn't seem to happen. I hope this is just because I have English .NET installed on my German Win2000 PC.
Does anyone have a non-English language version of .NET framework installed? Could you test this for me please?
Thanks.
VB Code:
With cboColour.Items
.Add(KnownColor.Red)
.Add(KnownColor.Yellow)
.Add(KnownColor.Blue)
.SelectedItem = KnownColor.Red
End With
This world is not my home. I'm just passing through.
-
Oct 2nd, 2003, 10:13 AM
#2
Thread Starter
Frenzied Member
Well, I reinstalled my German Win2000 PC with German .NET 1.1 and the German Language pack.
Guess what?
The combo still displays the colors (sic) in American.
Ah well...
This world is not my home. I'm just passing through.
-
Oct 3rd, 2003, 10:40 AM
#3
Frenzied Member
well known colors are still static variables i guess.. just like when that a command like .CLICK wont become german in a german .net framework installed whatever 
i think that something like blue just gets converted to 0,0,255 or so.
why did you want to do so anyway
-
Oct 6th, 2003, 02:43 AM
#4
Thread Starter
Frenzied Member
It was easy to write the code if I just populated the combo box with KnownColor items - it took care of the text in the combo box and I could just apply the SelectedItem to my other objects when the user clicked on the combo. I was hoping that it would take care of the language translations for free as well.
I've had to rewrite it now to look up the colour names from a resource file and add them as string objects to the combobox. I also now have to use SelectedIndex and a Select Case construct to make the assignments to my objects when the user clicks on the combo.
This world is not my home. I'm just passing through.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|