Head over to poshud and @adam is using the DISPLAY = BLOCK css and has nicely formatted side-by-side input, but on my screen for this example it looked messy so I used INLINE-GRID
Thanks for the input. I upgraded to version 2.6.2, and also changed the value of “Display”. I tested using both grid, and box. I have still not yet gotten this to work. Here is a screenshot of what I am trying to fix. It may be a little hard to understand since I had to redact sensitive info.
I would like to widen the width of the drop down menu so it displays more of the text. Currently it is truncating it to multiple lines. Which makes it difficult to read and choose the option you are looking for.
So is it the fact your column that is nesting the select needs to be a bigger size? Make those to changes to the demo code, run the demo and see the results yourself this is a whoppa dropdown in size
New-UDLayout -Columns 3 {
New-UDCard -Title "Move The User Account To OU '" -BackgroundColor '#5583D2' -FontColor white -Content {
if ($null -ne $Session:SelectedUserSAN) {
$CurrentOU = Get-ADUser -identity $Session:SelectedUserSAN -Properties canonicalName | Select-Object @{Name='OU';Expression={$_.DistinguishedName.Split(',')[($_.Name -split ',').count..$($_.DistinguishedName.Split(',')).count] -join ','}}
$OUHeadingMessage = "$Session:SelectedUserName is located in the following: " + $CurrentOU.OU
New-UDHeading -Text $OUHeadingMessage
New-UDSelect -Option {
foreach ($OU in $Cache:OUs) {
New-UDSelectOption -Name $OU.DistinguishedName -Value $OU.DistinguishedName
}#end foreach
} -OnChange {$Session:OU = $EventData}
New-UDRow -Columns {
New-UDColumn -SmallOffset 4 -SmallSize 4 -Content {
New-UDButton -Text "Move" -OnClick {
try{
Move-ADObject -Identity $Session:ObjectGUID -TargetPath $Session:OU -Confirm:$false
Show-UDToast -Title "Move User" -TitleColor '#00529b' -Message "$Session:SelectedUserName was succesfully moved to $Session:OU . " -MessageColor 'black' -BackgroundColor '#64dd17' -Duration 9000 -Position center -Overlay
Sync-UDElement -Id 'DivBox2'
#Write-EventLog
}#end try
catch {
$OUError = $_.Exception.Message
Show-UDToast -Title "Move User" -TitleColor '#00529b' -Message "Error: Unable to move $Session:SelectedUserName to $Session:OU. The error is: $OUError " -MessageColor 'Black' -BackgroundColor '#E53935' -Duration 9000 -Position center -Overlay
#Write-EventLog
}#end catch
}#end udbutton onclick
}#end udcolumn
}#end udrow
}#end if
}#end udcard Move User
}
I also have a bunch of additional cards nested under the same UDLayout.
I like the current layout and wanted to avoid having to change it. So I thought I could adjust the width of the UDSelect by using CSS. I unfortunately don’t know CSS at all. I did however get it close to what I want by adding the following to my theme file.
'.dropdown-content' = @{
postion = 'relative'
}
I’ll probably just take your advice and change the layout up a little. Thanks for being so willing to jump in and help!
No worries man…well it’s just gone midnight where I’m at so I’m off to bed. But as you kindly provided your layout I will see what I can do by inspecting some elements…
I just wanted to provide an update. I was able to get what I needed by adding the following to my theme file.
'.dropdown-content' = @{
'min-width' = '500px'
}
This adjusted the width of the dropdown when it is opened. The change did also set the value across all drop downs as well in my site. I wish I knew how to set it for just the one, but oh well it got me what I needed.