Author Topic: Dropdown sizing issue  (Read 17 times)

Gillissie

  • Jr. Member
  • **
  • Posts: 79
Dropdown sizing issue
« on: July 11, 2018, 05:59:38 PM »
Hi Stephan,

I'm using a TMP_Dropdown object, and am populating it with options at runtime. I removed the three options that are there by default in the editor.

I had to increase the height of the template option item to make it large enough for the screen at 1080 height, but for some reason the "Dropdown List" is always a half an item too short, and the scrollbar doesn't appear. If I add more items, the list gets longer, but still always a half item too short and no scrollbar.

Screenshots:
https://screencast.com/t/vbVe80KuU
https://screencast.com/t/wSJg7TL1F

Am I doing something wrong?

Thanks,
Todd


Gillissie

  • Jr. Member
  • **
  • Posts: 79
Re: Dropdown sizing issue
« Reply #1 on: July 11, 2018, 06:16:20 PM »
Ok, I think I figured it out, though it wasn't obvious at all...

The "Content" item (the parent of the "Item") needs to be sized to the height you want the "Item" to be. I guess the dropdown uses the "Content" size to determine the height of the dropdown box instead of the "Item" size.

https://screencast.com/t/CXQS43rfz