I'm new to this flex. Can anybody solve my problem? This is my query: I have ahome page divided into 3 parts like top, left, middle positons. In the middle postion -panel and combobox are there. I want to load my module to the middle positon like to panel. I have combobox, when I selected any item based on that I'm loading a module to that panel using Custom moduleloader control. Up to here it's working fine. My probelm: I select one option from combobox, it shows the one module(sam1). When I click(sam1), it should open anothermodule(sam2) in same location (instead of sam1-sam2). So can you tell me your ideas on how to resolve it?
Apache – how to load Module to control like panel , vbox etc +flex
apache-flexflex3
Related Solutions
I've been dealing with this issue myself, off and on and in various forms, for a year, and while I haven't figured out just what's causing it yet, there's clearly a mismeasurement happening somewhere along the line.
What I have been able to to, though, is work around it, essentially by subclassing button-type controls (in my case, Button, LinkButton, PopUpButton, et. al.) and assigning their textField members instances of a UITextField extension whose truncateToFit element simply returns false in all cases:
public class NonTruncatingUITextField extends UITextField
{
public function NonTruncatingUITextField ()
{
super();
}
override public function truncateToFit(s:String = null):Boolean
{
return false;
}
}
The custom component just extends Button (or whatever other button-type control is the culprit -- I've created a half-dozen or so of these myself, one for each type of control), but uses a NonTruncatingTextField
as its label, where specified by the component user:
public class NonTruncatingButton extends Button
{
private var _truncateLabel:Boolean;
public function NonTruncatingButton()
{
super();
this._truncateLabel = true;
}
override protected function createChildren():void
{
if (!textField)
{
if (!_truncateLabel)
textField = new NonTruncatingUITextField();
else
textField = new UITextField();
textField.styleName = this;
addChild(DisplayObject(textField));
}
super.createChildren();
}
[Inspectable]
public function get truncateLabel():Boolean
{
return this._truncateLabel;
}
public function set truncateLabel(value:Boolean):void
{
this._truncateLabel = value;
}
}
... so then finally, in your MXML code, you'd reference the custom component thusly (in this case, I'm telling the control never to truncate its labels):
<components:NonTruncatingButton id="btn" label="Click This" truncateLabel="false" />
I agree it feels like a workaround, that the component architecture ought to handle all this more gracefully, and that it's probably something we're both overlooking, but it works; hopefully it'll solve your problem as you search for a more definitive solution. (Although personally, I'm using it as-is, and I've moved on to other things -- time's better spent elsewhere!)
Good luck -- let me know how it works out.
try putting all the buttons inside an Hbox and then setting the rotation of the Hbox to 90.
Oh and also make sure you rotate around using a point at the center.
Best Answer
It sounds like what you need is to put all the modules into a ViewStack. Then you have a choice:
Something like: