fbpx
 

Shobhit Samaria

Get to know more about my projects here!

How to specify the width of the drop down popup in a Flex DropDownList

In a previous post, it has been seen that it is quite easy to make the drop down of the DropDownList auto expand to the size of the contents. But we have also seen that it is a bit flaky, in the sense, the width of the popup jumps around when it encounters content that is longer than any it has been displaying previously. This is because the drop down uses the DataGroup which creates itemRenderers judicially on a “as needed” basis. In some cases, it might be better if the popup opens up to a fixed width to give a consistent UI performance. Again, the standard DropDownList does not allow for it and we have to make a simple tweak to make this happen.

Read More

Auto Expand the width of drop down popup of Flex Spark DropDownList / ComboBox

I am pretty sure many people would have run into this kind of requirement many times. The problem is that when using the Spark controls like the DropDownList, the actual drop down that displays the list of options is defaulted to the width of the DropDownList component. If the length of options are greater than the width of the component, then a horizontal scroll bar appears automatically. Now, horizontal scroll bars are a bit of pain and never look good on a GUI. However, there is a very easy way in which the DropDownList can be made to auto expand to the length of the options it displays. Read More

Flex Popup as a UIComponent

One of the things that I don’t like about the Flex Popup’s is that despite it being a “view”, I can not declare it within mxml. I have to create a separate class for the popup component and then use the PopUpManager API to display it and remove it. Wouldn’t be so nice if I could just declare the component to opened up, within my mxml  and I could easily pass/get data from the component using bindings etc.

Read More