ActionScript 1/2 :: Set The Backgroundcolor Of A Datagridcolumn
May 11, 2010Can somebody share an example on how to set the backgroundcolor of a datagridcolumn (dynamically)?
View 3 RepliesCan somebody share an example on how to set the backgroundcolor of a datagridcolumn (dynamically)?
View 3 Replieshow to set the scrollpane's background color in AS3 with CS4?You can't seem to use _Globals, setStyle,and opaqueBackground doesn't seem to work
effectively.
I've already tried a lot, but there was no way I could change the color of my textInput. Adobe Livedocs couldn't help me and there was no working piece of code I could find in other messageboards.
These things haven't work for me:
myTextInput.setStyle("backgroundColor", 0xFFF00);
--
myTextInput.setstyle("backgroundColor", Number(0xFFF00));
--
myTextInput.setstyle("backgroundColor", "#FFF00");
Do I have to do something about the border of the textInput. Or about the "background"-Property (if it still exists for AS3)??
That's really all I want to do. Why is something like this so complicated? When you go into Component edit mode, you can easily change the highlight colors. Then why make it impossible to change the actual ground color? Why should I have to scour the internet to find complex code just to change the color? Sorry, it's just frustrating.Anyway, if setStyle("backgroundColor", 0xCCCCCC); ... was all I needed to do that would be fine, but that doesn't work.Even if it's not possible, I would accept text rollOverColor, or hover... nothing.I think there should be a drop down color box in the component editing window at the very lest.
View 3 RepliesI have a Flex 4.5 mobile app, I'm trying to set the backgroundColor to black, aka 0x000000 at runtime.It won't go black, in fact, it will go any other color but black.[code]Just as some extra info, I have my original Application backgroundColor #333333 set in a .css file and in the MXML Application node.
View 1 RepliesI searched and didn't find quite the right solution. Please bare with me as I am a complete infant with this.Using a component listbox in CS4. I have figured out how to call in formatting to the text by using this:Code: Select allimport fl.managers.StyleManager; var tf:TextFormat = new TextFormat(); at the head, and referring to it below, with:
Code: Select alltf.font = "Arial";
tf.size = 10;
tf.bold = false;
[code]....
I dont know how to change the backgroundcolor of the stage.
Shouldnt:
_root.backgroundColor = "0x00ff00";
..normally do the trick?
Just realized I don't know how to change the backgroundcolor of the stage.
View 1 RepliesI have a textinput component that needs to have a transparent background. I've tried adjusting the alpha to 0% and 25%, the former doesn't display the contents (white font bold sans-serif) and the latter leaves a shaded background. I've also tried the following:
var tf:TextFormat = new TextFormat; tf.color=0xFFFFFF; tf.font="Sans-serif"; tf.size=12; tf.bold=true; txtlowtemp.setStyle("textFormat",tf); txtlowtemp.backgroundColor=undefined; txthitemp.setStyle("textFormat",tf);
[code].....
I have a textinput component that needs to have a transparent background. I've tried adjusting the alpha to 0% and 25%, the former doesn't display the contents (white font bold sans-serif) and the latter leaves a shaded background. I've also tried the following:
var tf:TextFormat = new TextFormat; tf.color=0xFFFFFF; tf.font="Sans-serif"; tf.size=12; tf.bold=true; txtlowtemp.setStyle("textFormat",tf); txtlowtemp.backgroundColor=undefined; txthitemp.setStyle("textFormat",tf); txthitemp.backgroundColor=undefined;
However, this gives error 1119 access to possibly undefined property backgroundColor.
How can I create a truly transparent background for these components?
I have a textfield on stage and on RollOver I want to get it's background color?
my code:
this.createEmptyMovieClip("holderSub_mc",mydepth+21029);
this.holderSub_mc.createEmptyMovieClip(["sub1a_mc"], mydepth+15);
[code]........
i can set the stage's background color, etc., using a SWF metadata tag:
[SWF(width="1024", height="600", frameRate="60", backgroundColor="#000000")]
or if i'm using Flash Professional, i can simply set these properties for the document in the UI.
while the Stage class offers the ability to set a frameRate and override width and height thru properties in actionscript, why is it not possible to set the background color of the stage the same way?
Stage doesn't have a property (public or otherwise) for background color. can anyone explain why that is? it seems strange to me but i'm assuming there is a good reason rather than this simply being a oversight.
Im trying to change the background color on my textarea from an external css.I can change the color of the buttons so the style sheet is working. But I cant seem to ad the class into the text area.[code]...
View 2 RepliesExample text in white and background in black. [URL]If you select the text something is happening. But the default colors are not really set well. In HTML is automatic done, but in AS3? If the background is white and tekst black it works all fine....
View 1 RepliesI'm making a form and i want to set a backgroundColor for the textfields onSetFocus and that the backgroundColors dissapear again onKillFocus. So far I have this code
[Code]...
I have a simple application which uses a RichTextEditor with a colored background, like so:
[code]...
This works fine when I compile against Flex 3.5.0, but in Flex 4.0 and 4.5, the background color remains white. I've tried setting it before the text, after the text, before and after it is added to the stage - even every single frame with an EnterFrame handler. Nothing - it just stays white.
Has anyone else encountered this and does anyone have a workaround? I don't really want to switch to a Spark component if I can help it, and I can't downgrade the whole application to 3.5.
Folx; Does the manual document the setting of transparency in TextField.textColor or TextField.backgroundColor, not just the _alpha of the TextField altogether? If so, I cant seem to find it. In addition to the RGB/hex values, the color palette in the Properties panel allows you to set transparency in %, yes, but can this also be achieved programmatically?
View 1 RepliesI would like to change backgroundColor of an drawn object(square) by mouseover. I acutally found the function for mouseover in action scripts but BackgroundColor("#ccc") does not work.
View 3 RepliesI'm building an application using flex 4.
Using <mx:DataGrid> to display a table.
I would like to add a <s:GlowFilter> to a DataGridColumn. How can I do so?
I'd like to use an embedded font in the column headers of my datagrid. Although this seems like it should be a pretty common task, I seem to have stumped Google trying to find a decent, modern example (that actually works) for creating an appropriate headerRender in Flex 4.
Can anyone point me to an example of how to use an embedded font in the column header of a datagrid? I've spent hours trying to figure this out.
Is it possible to put an itemrenderer on the DataGrid itself rather than a datagridcolumn? I could only find examples for datagridcolumn. I want a generic itemrenderer on all the items in a datagrid...
View 1 RepliesI have a datagrid column with a button that opens a modal dialog box allowing the user to upload multiple files. In the code below, the browseAndUpload() method does that. When the user finished uploading files and closes the upload box the closeUpload() method is called. I know for a fact that the uploaded files are being copied into arrFiles.
The problem I am having is that the repeater will not show the files in arrFiles. Here is the code:
<mx:DataGridColumn id="dgcUpload" width="42" headerText="Uploaded Files"
editable="false">
<mx:itemRenderer>
[Code].....
I have this DataGrid:
<mx:DataGrid id="myDataGrid">
<mx:columns>
<mx:DataGridColumn dataField="colA" headerText="Column A:" width="40"
[code].....
I am using a custom componenet based off of text as an itemRenderer for a dataGrid that is displaying an XMLList. I want to be able to re-use this itemRenderer for multiple columns, how do I access the dataGridColumn so I know which field to assign to the text value?
super.data gives me the whole XML item, super.parentDocument gives me the whole DataGrid
I have a DataGrid with 3 DataGridColumns. All 3 of them have separate dataFields.I need to get the datafields into an ArrayCollection and pass it to a funciton. I dont want to hard code the ArrayCollection.
View 1 Replieshow to concate two datafield in a datagridcolumn?
View 2 RepliesI have a dataGrid with a custom dataGridColumn having as itemRenderer MyItemRenderer. My problem is that I want from MyItemRenderer to access informations in the dataGridColumn. More exactly I would like for an itemRenderer I would like to know the associated dataGridColumn.
View 1 RepliesHow do I make text selectable (so I can copy) in a DataGridColumn?
View 2 RepliesI have a datagrid that I want to add a column of radio button using AS3 (instead of mxml). I was able to do this with a custom itemRenderer.
var dgc:DataGridColumn = new DataGridColumn();
dgc.itemRenderer = new ClassFactory(com.mypackage.RadioBtnColumnItemRenderer);
In my RadioBtnColumnItemRenderer.mxml, I have a box with a radioButton... like so:
<?xml version="1.0" encoding="utf-8"?>
<mx:Box xmlns:mx="[URL]" horizontalAlign="center" verticalAlign="middle">
<mx:RadioButton id="btnRadio" groupName="btnRadioSelect"/>
</mx:Box>
When I run the application, the radio button shows up in the column as it should. However, I cannot select just ONE of the radio buttons. I am able to select all of them, but I don't want this... I want the ability to select one and then if I select another one, then the first one is unselected and the current one becomes selected (just like you would expect radio buttons to work).
How can I validate the cells in a DataGridColumn individually? (ActionScript 3.5) The validation is configured per-cell, based on fields in the given row. For example
FIELD VALUE TYPE
age 13 Integer
height 13x3 Integer
[code].....