|
|
|||||||
I am trying to populate a combobox with a list of values from an array of 7 elements. I want to default the selection to one of the elements based on what another variable contains. The "match" variable will contain exactly the same text as one of the combo-box elements. I assume that I need to use the "$cboChoice.Selected" property, but I'm not sure how to specify WHICH element in the combo box to apply it to. The online help is not available for that topic, and I can't find an example in the sample scripts (yet). Here's what I've got so far - don't know how to make the item Selected when I find it. code:Thanks! Glenn PS - is any other KixForms documentation available that I'm not looking at?? |
||||||||
|
|
|||||||
Here u are : $Default = 1 ; set elsewhere... but set the Array Element Number !!! $aryTYPES = "Red", "Green", "Blue" ;create the Combo before $cboType.List = $aryTYPES ; populate Combo $cboType.ListIndex = $Default ;sets marked item to $Default hth Jochen [ 03. March 2003, 20:19: Message edited by: jpols ] |
||||||||
|
|
|||||||
Hi Glenn, Heres a shortcut for doing both those thingies: code:-Shawn$cboType.List = "Red", "Green", "Blue" |
||||||||
|
|
|||||||
wahey Shawn ... Youre online ? {Hijacking Post} |
||||||||
|
|
|||||||
Thanks, guys.. Where, if not on the KixForms site, would you get this info? Is it close enough to use VB docs? (not that I'm too good at VB, but they're available) Gonna go with Shawn's suggestion, as I'd have to write additional code to determine the index of the default. The value is queried from a remote system, but I didn't want to make the sample that complex. But - I now have two ways documented to set the cbo default. Shawn: - Just gotta ask.. (since your code post wasn't in color) Did the use of the kix code formatter relate in any way to your previous Avatar (or vice-versa)? Glenn |
||||||||
|
|
|||||||
Use ASCAN or the IsInArray() UDF to find the index of an element in an array. |
||||||||
|
|
|||||||
Glenn - avitar & color ? Yeah actually, it did relate to postprep a little bit I guess - I asked Jose if he could add a splash of color and this was while Jochen and Jooel were developing PostPrep - I don't have PostPrep handy where I am right now, thats why I didn't use it. Ahoy Captain - I'm never too far away from the family here at korg ! -Shawn ps Docs ? I'm working on the CHM as we speak. Also trying to get the next version of kixforms out the door. [ 03. March 2003, 21:40: Message edited by: Shawn ] |
||||||||
|
|
|||||||
Shawn You got your hat back again !! . I can see the pills finally made effect your color came back too. Pass me the rehab clinic phone number I might need it........soon. If any makeup change is required please let me know. IŽll be glad. Thanks. [ 03. March 2003, 22:55: Message edited by: jose3 ] |