ComboBox shows 1 result in vertical order letter by letter

Nov 18, 2013 at 10:16 PM
The code below creates a window and provides a drop down list.
The contents of this list is retrieved from a Managed Object that is returned from VMwares PowerCLI.

$clusterList.Name returns a list of names of clusters.

When this is used with -ItemSource $clusterList.Name it returns the cluster name "My Cluster" as

M
y

C
l
u
s
t
e
r


Am I missing a switch? is this a bug?

Thank you in advance for your help.
# Get Cluster
New-Window -ControlName Get-DatacenterAndCluster -Width 500 -Height 400 -Title 'Select Cluster' -WindowStartupLocation CenterScreen {
    New-Grid -Rows 6 -Columns 3 -UseLayoutRounding -Margin 20 {

                         
        $clusterList = Get-Cluster
 
        
        # Title
        New-Label -Row 0 -Column 0 -ColumnSpan 3 -HorizontalContentAlignment Center "Select Cluster" -FontSize 24 -FontWeight Bold
        
        # Cluster
        New-Label -Row 1 -Column 0 -HorizontalAlignment Center "Cluster:" -FontSize 14 -VerticalContentAlignment Center -FontWeight Bold
        
        New-ComboBox -IsTextSearchEnabled:$true -Name selectCluster -Row 1 -Column 1 -ColumnSpan 2 -IsReadOnly:$True -ItemsSource $clusterList.Name -Height 24 -On_SelectionChanged {
                  
            $global:currentCluster = Get-View -ViewType ClusterComputeResource -Filter @{"Name" = $this.SelectedValue}
            
        }
        
        

        # Error Message
        New-Label -name errorMessage -Row 4 -Column 1 -ColumnSpan 2 -HorizontalAlignment Center -FontSize 12 -VerticalContentAlignment Center -FontWeight Bold -Foreground Crimson

        
        # Next button
        New-Button @nextButtonParam N_ext -Row 5 -On_Click{ 
                             
            Get-ParentControl | Set-UIValue -passThru | Close-Control
        }

                
    }    
} -Show
Nov 19, 2013 at 12:30 AM
Ugh, I figured it out.
-ItemsSource $clusterList.Name
needs to just be
-Items $clusterList.Name
Marked as answer by Jaykul on 11/25/2013 at 1:43 PM