Re: PowerApps dropdown width based on Item width
Hey @ImaKickUrAsh
So, I tried to replicate your situation in my app.
I took a dropdown. In that I took some values ["Apple","Banana","Orange from a Treetop","Photosynthesis"]
Now see whatever is the width of the dropdown when you select the biggest field. So above Orange from a treetop is the biggest. 240 width was fitting for this. Now I saw the width for apple. It was about 100.
So, if we see the length of apple it is 5. If we multiply 5 by 20 it is equal to 100. So likewise I thought in width property we can do that.
Now in the width property I wrote this expression:
If(Len(Dropdown3.SelectedText.Value)*20>240,240,Len(Dropdown3.SelectedText.Value)*20)
So this checks if the product of length and 20 of whatever is selected in dropdown goes above 240, then I will take the width of dropdown to 240 which is equal to my biggest value in the dropwdown. And if it is less than 240 it will automatically take width of whatever is selected.
Output:




So, if you like this approach you can apply it.
I hope this helps 🙂