Flex :: Fcreate HBox Component With Default Values
Dec 7, 2009I want to create an HBox component; for example HLBox that behaves exactly like an HBox but has as default width and height 100%.
View 1 RepliesI want to create an HBox component; for example HLBox that behaves exactly like an HBox but has as default width and height 100%.
View 1 Replieshow can we create a wobbling effect using flex 3?I need something like the effect which is show in ubuntu when we see an alert or move a folder.
View 1 RepliesI am using a Field Container to enter a new Contact information, and I would like to populate some of the fields with values.
I can do this for normal fields like Phone and LastName, but ti does not work for lookup fields like ReportsTo and Account.
This is th code I am using:-
var acc:DynamicEntity = new itemClass("Contact");
acc.Phone="8888";
acc.LastName="Nieddu Srl"
acc.ReportsTo ="0012000000RsJYb"
acc.Account="test"
_createFieldContainer.render(acc)
Is there any way to populate a lookup field with a default value when the field container is called?
I have an xml with an xml-schema. The xml-schema defines an abstract complex type with 2 optional attributes that have default values. Then I have several complex types that extend the base one. And finally nodes of the types defined.So I load the xml and when I parse each node, the optional attributes are not present at all.I've tried fooling around with the namespaces, even[code]...
No luck. Something similar was being experienced by this guy on codingforums, but that was like 5 years ago. Same is happening to me with firefox 3.0.11 - the xml is shown without the default attributes.For now I'm setting the default values in code, but isn't there a way to make them available from the xml-schema?[code]...
I'm trying to provide some default sorting within the OLAPDataGrid component in Flex. There appears to be a dataCompareFunction on OLAPAttribute, but nothing I do seems to actually trigger calls to that method. Any suggestions around using this method or any others to provide sorting of the dimensions on OLAPDataGrid?
View 2 RepliesHow do you set the default value of skinClass for a custom component in Flex? I've extended the DropDownList with my custom component, but I would like to specify a default skin to go with it instead of always setting the skinClass value for each instance.
View 1 RepliesI'm creating some custom components and backing code. I've created a Flex library project in Flash Builder which compiles to a SWC. The problem is now that all my MXML files get compiled into classes in the default package, making the whole thing a big mess.Is there a way to set a package declaration for MXML files? After all it just gets translated into AS3 classes. This seems to work in regular Flex projects using a namespace declaration so I'm at a loss how that is supposed to work. The other option is building out all the components in AS3 which I'd like to avoid.
View 1 Repliesi have a component which gets the data selected by the radio button
<mx:itemRenderer >
<fx:Component id="radio">
<mx:RadioButton selected="false" useHandCursor="true" change="item_changeHandler(event)">
[code]......
I have a mxml component with a datagrid listing project names and code versions. I have the selected projects from the datagrid binded to a public variable named "selectedProjects". But how to access this variable in another mxml component. I want the selected project's name in that component's text area. I even created an instance of the first component and using that called the selectedProjects variable. But I do not get the value updated in the text area.
This is the code for the first component where I get the selected projects name in a variable:
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="handleCreationComplete();"
width="800" height="600">
[Code].....
I was trying to update the value of the selected projects in the text area of Id "projDocs", But I do not get it..
I am applying hb.horizontalScrollPosition = value and it does not work withhorizonalScrollPolicy = on/off. Is there any other way to achieve this?
View 1 RepliesI'm trying to set the hand cursor on a HBox. I've tried buttonMode and useHandCursor but have had no luck. This example displays the busy cursor. how to make it display the flashPlayer's hand cursor?
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:components="com.dn2k.components.*" >
[code]....
I create an HBox, fill it with a grid of buttons, and set the scroll policy. When I resize the window, the stage changes size, and so does the HBox ... to a point. Once it reaches the height of the Grid it contains, it stops shrinking, like it has a "min-height". This ruins the scrollbar that I'm trying to establish in this case.
I've set the height to 100%, shouldn't it always take the height of the stage, it's parent?[code]....
I have a VBox inside which I have 4 HBoxes. The second level HBox is initially hidden.When I click the label, 'Show more Options', the second level HBox is displayed.Now I have the space occupied by the 'second level HBOx' empty and the 'search' button appaers below the space.My first question is, Is there a way to position the Search Button in such a way that, the space is not there and after the 'Show more Options' label is clicked, the 'Second Level HBox' appears?And the second question is, Can I position the Search Button at the center of the page. Is there any method to center the contents of a HBox of a VBox?This is my code:
<mx:Form x="47" y="219" width="80%" >
<mx:VBox id="searchBox" >
<mx:HBox id="searchTitle" width="100%" height="20" backgroundColor="#2680D5">
[code].....
I only really need the HBox answer but figure that if we get a good answer in here I'm trying to do a similar thing with a VBox. It would be nice to know this in both actionscript and MXML. So I have an HBox that I want some text aligned from the left and some radios from the right. Like so:
[CODE]...
I have a HBox with no background, but with some children. Behind the HBox is a button which need to be clicked. The button is unclickable at the moment because the HBox is on top of it. I need the button to be clickable and still have the HBox on top of it
View 1 RepliesI have a HBox and I dynamically add Buttons into it. I want to distribute such buttons horizontally, however I would like to place there on more rows if there is not anymore horizontal space, instead of seeing the scrolling bar.How can I do that ?
<mx:HBox id="tagsPopup" visible="false" horizontalAlign="center" width="100">
<mx:LinkButton label="Tag1" />
<mx:LinkButton label="Tag2" />
<mx:LinkButton label="Tag3" />
<mx:LinkButton label="Tag4" />
</mx:HBox>
I am in need of a strange solution. I have one requirement in which I am displaying two components in a VBox. But on click of the main container I need to maximize that and need to display the components in horizontal. I was just wondering whether I can change the VBox to HBox and viceversa dynamically using actionscript or some other way.
View 1 RepliesI have assigned a logo image of my software to HBox as follows [code]...
Now I need to change the backgroundImage to some other image on a event.
[code]will this represent possible performace increase instead of writing like so:[code]
View 1 RepliesIs there any way to set horizontalAlign from Action Script not from mxml?
View 1 RepliesI'm trying to create an HBox in flex that has only the top corners rounded. HBox (and all the other flex containers) have a cornerRadius style, but it applies to all corners. I'm not seeing a way to specify the style of individual corners.
Is there any built-in way to do this, or will I need to write my own custom drawing code to draw the background with rounded corners?
How can I set default values for the parameters of a function in AS2? I am trying the common way but it doesn't work...
Code:
private function myFunction (param1:Number = 3,
param2:String = "a string",
param3:Boolean = false, etc ....):Void
{
....
}
I'm adding dynamically labels to hbox, and i need to remove all spaces between the text of 2 nearby labels
i did horizontalGap = 0 for Hbox
padding left and right = 0 for labels
anything else i could do ? or maybe some other component
[Code]...
I am facing a wiered problem in Flex. I Have a canvas with a HBox and Label. Please find the code below.
<mx:VBox verticalAlign="top" horizontalAlign="center"
fontSize="12" fontWeight="normal" verticalGap="0">
<mx:Label text="Cover" />
<mx:Canvas width="120" styleName="pbcontainer">
<mx:HBox id="pb" height="35" />
[Code]...
I am facing a wiered problem in Flex. I Have a canvas with a HBox and Label. Please find the code below.
<mx:VBox verticalAlign="top" horizontalAlign="center"
fontSize="12" fontWeight="normal" verticalGap="0">
<mx:Label text="Cover" />
[code]......
If you have a function that accepts a parameter of Point type, how do you assign a default value?
PHP Code:
setPosition(position:Point =(0,0)){
}
I tried (0,0), (x:0, y:0) {x:0, y:0} and none worked... anyone know the correct way?
how to set default property values for objects that are being created in a loop.
In the example below, these propeties are the same for each object created in the loop: titleTextField.selectable, titleTextField.wordWrap, titleTextField.x
If you pull these properties out of the loop, they are null because the TextField objects have not been created, but it seems silly to have to set them each time.
var titleTextFormat:TextFormat = new TextFormat();
titleTextFormat.size = 10;
titleTextFormat.font = "Arial";
[Code]....
I've run into an extremely odd problem. I'll give a code example to start. This is the superclass Building.
Code:
public var allowsEnemyMovement:Boolean = true;
public var information:String = "";
public var buildingName:String ="";
[Code]...
Now here's the odd part. Only SOME of the variables defined in the superclass do this. the variable information, buildingName and health all will take the default value from the super class. But the variable defenseValue will take its value from Factory's constructor. What am I doing wrong here? I would like to keep default values in the superclass so that I don't end up with null pointer errors later just in case.
I need to insert a Box containing some text that appears between the grid header and main content and spans all the grid columns. I've been searching and experimenting (addChildAt()) but no luck so far. Is this possible to achieve?If not, is it possible to dynamically render the text in the header itself, below and spanning the column header text?
View 1 RepliesThis code seems to compile fine in the IDE, but the command-line compiler (SDK 4.5 mxmlc.exe) reports "Parameter initializer unknown or is not a compile-time constant."
package {
public class Constants {
public static const CONSTANT : int = 0;
[Code].....