View previous topic :: View next topic |
Author |
Message |
jicman
Joined: 22 Dec 2004 Posts: 298 Location: Rochester, NY
|
Posted: Sun Jan 28, 2007 11:36 pm Post subject: selectedValue("value") for comboBox and listBox |
|
|
I have been trying to set the display position or value for both the comboBox and listBox and it does not work. The only thing I have gotten to work is selectedIndex(index). Is it maybe because it needs to have a null value to end the string?
Will you tell me if it is working as it should, and if so, how do I use the selectedValue() property setters and getters?j
Right now, what I am doing is using two arrays: int[char[]] and char[][] to be able to get this to work. Any help would be greatly appreciated.
This is how I initialize it:
Code: |
PclassStr =
[
" ",
"PM",
"Translation",
"DTP",
"ContextProof",
"Quote",
"Interpretation",
"VoiceOver",
"TradosProc"
];
foreach (char[] str; PclassStr)
ProjClass.items.add(str);
PclassInt[""] = 0;
PclassInt[null] = 0;
PclassInt[PclassStr[0]] = 0;
PclassInt[PclassStr[1]] = 1;
PclassInt[PclassStr[2]] = 2;
PclassInt[PclassStr[3]] = 3;
PclassInt[PclassStr[4]] = 4;
PclassInt[PclassStr[5]] = 5;
PclassInt[PclassStr[6]] = 6;
PclassInt[PclassStr[7]] = 7;
PclassInt[PclassStr[8]] = 8;
|
Thanks.
josé |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Mon Jan 29, 2007 5:17 pm Post subject: |
|
|
Items are actually stored as Object, adding char[] is only a convenience. To get the char[] back after adding, just call toString() on the item.
mylistbox.items[i].toString()
I understand how this can be confusing. I should be writing up some better documentation and/or tutorials soon. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|