Reputation: 141
I have a panel and i have set minWidth and width for it. The code looks like this <s:Panel id="adg1" x="199" y="164" width="200" minWidth="300" title="Title">
Here the expected behaviour is width of the panel should be 300 since the minWidth > width,but the panel width is 200.I dont understand where i have went wrong.Any ideas...
Thanks in advance!!
Upvotes: 0
Views: 848
Reputation: 8875
HAve you looked into the PanelSkin class? There is a minWidth property set to 131. That's probably why the width is set to 200.
Try to remove the minWidth property of the skin and look if it changed something or not
Upvotes: 1
Reputation: 39408
Keep in mind that the size of a component is always set by the container's parent. A component never sets its own size. MXML can mask this a bit.
I would expect an explicit width (AKA width="200"
) to override any minWidth value that you set. Since you set an explicitWidth to 200; I don't think minWidth will ever be considered. But, you'd have to look specifically at the layout code for the container which contains your Panel.
Upvotes: 0