Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




DataGrid And Multiple Colors



How can I modify a DataGrid so that individual rows can be set to specific colors? I know that there's an "alternating row" style, but that won't do for this. Thanks, RD



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 06-04-2004, 03:38 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

DataGrid And Multiple Colors
How can I modify a DataGrid so that individual rows can be set to specific colors?

I know that there's an "alternating row" style, but that won't do for this.

Thanks, RD

Colors In XML Driven Datagrid
Hi professionals.

I have a flash datagrid, that is XML driven, and uses a XML connector and a dataset.
This grid is displaying a price list.

I have been caught in a deadlock regarding how to dynamically set the color for sold objects red.

I have this object: <STATUS></STATUS>

This being sold or available. I would like the status column to check the status tag to see if it is sold or not, and then set the colors green or red respectively.

I have pondered this one for quite some time without figuring out how. Please help!?!?!

Datagrid Row Colors Without Alternatingrowcolors
Just trying to figure out if there is a way to set the row color of a selected row or by data on rows with any specific order. Anyone got any ideas? I guess I could do it by using an array on alternatingrowcolors and using actionscript to determine which rows need which colors but that seems a bit to long...figure there has to be one method to set a single or multiple row color.

DataGrid Component - Row And Column Colors
Hello,

This question deals with the DataGrid UI Component that comes with the Developer's Resource Kit.

What I need to do is display alternating color rows in a DataGrid, while keeping specific columns all a single color. I'm using the DataGridObject.alternateRowColors method to color the rows, and DataGridColumnObject.setStyleProperty( "background", theColor ) to change the column color.

Here are a couple of files that you can look at or download to see what I've got so far...

http://www.*****.com/DataGridTest.html
http://www.*****.com/DataGridTest.fla
http://www.*****.com/DataGrid.pdf (documentation for the DataGrid component)

As you can see, the red column gets overlaid by the alternating colors. What I would like to have happen is for the red to be on *top* of the alternating row colors.

Here's the exact code that is attached to the DataGrid object:

onClipEvent( load )
{
this.setColumns( "first", "second", "third", "fourth", "fifth" );
this.setEditable( true );

var dataArray = new Array();

dataArray[0] = { first:"Bill", second:"Jones", third:"123 St.", fourth:"City A", fifth:"43212" };
dataArray[1] = { first:"Ted", second:"Smith", third:"456 Ave.", fourth:"City B", fifth:"23454" };
dataArray[2] = { first:"Joe", second:"Test", third:"789 St.", fourth:"City C", fifth:"99898" };
dataArray[3] = { first:"Dave", second:"Gates", third:"876 St.", fourth:"City D", fifth:"76543" };
dataArray[4] = { first:"Betty", second:"Moore", third:"112 Blvd.", fourth:"City E", fifth:"98765" };
dataArray[5] = { first:"Sam", second:"Johnson", third:"984 St.", fourth:"City F", fifth:"77676" };

this.setDataProvider( dataArray );

this.alternateRowColors( "0x99FF99", "0x9999FF" );

this.getColumnAt(0).setStyleProperty( "background", "0xFF0000" );
}

MX2004 Datagrid: Set Unique Row Colors?
Boy I need help on this one, please.

I need to set specific rows in a datagrid component to a unique color or colors.

And I am not talking about how to alternate row colors, I know that one, but how can I set a color to a specific row in a Datagrid Component?

For example, I have 8 rows and I want the first 4 to be red, the next 2 to be orange and the last 2 to be yellow. Is this possible?

I have looked into the setPropertiesAt(index, {property:value, etc}); since the Datagrid class extends the List class, but either I am doing it incorrectly or it just doesn't work.

Any help here would be GREATLY appreciated.

Thanks!

Change DataGrid Scroll Colors
I'm using the MX04 DataGrid component and have managed to set all the other styles the way I want but have had trouble changing the colors used by the scrollbar.

So far I've been using code similar to this:
ActionScript Code:
////myDataGrid.setStyle("backgroundColor", 0xFF0000);////  


Can anyone help me change the colors of MyDataGrid's scroll bar?

Thanks.

Alternate FONT Colors In DataGrid
Im having some trouble finding any info on alternating the font colors in a datagrid component, i can alternate the background colours, but i'd like to alternate the font colors of the rows instead. Any idea?

Multiple Text Colors
I am wondering if I can have different colors in one text field. Whenever I change the color in the properties panel it changes all of the words in the text. I want to have most of the text black, but have some of the words in the text different colors. Can this be done, and if so how can I do it?

Dynamic Gradients With Multiple Colors
Hi.

I'm trying to create a gradient background for a small swf, where the details for each gradient is gathered from an XML-file. I know the colors, and how big they're supposed to be (in percent), but I'm having a little trouble converting the percentages into valid values for the ratio-array sent to beginGradientFill().

Multiple Colors In Textfield With Textformat
How would you enable color overrides to text in inside a textfield with a textformat applied to it? My textformat has a text color property, but how would I make things like links inside the text a specific color?

I tried putting inline styles in the links and it doesn't work. How would you do something like this?

Changing Multiple Mc Colors Individually
I have a number of different movie clips that I want to be able to change to color of. I have found plenty of examples where there is a color pallet changes the color of one specific movie. I want to be able to have one color pallet that is always on the stage. Using that pallet, I want to be able to click on a mc, click on a color, and have the color of that particular movieclip, and not the others, change.

Can anyone lead me in the right direction?

Multiple Colors Within A Dynamic Text Field
Hi

Im using this text scroller at present
http://www.macromedia.com/support/fl...t_scrollmx.htm

does any one know if its possible to have multiple colors of different
characters ie: 1st line
blue and 2nd line yellow

thanks very much for your help

How To Apply Multiple Colors To Dynamic Textfield?
Hello,
I have to buttons on my stage called: button1_btn and button2_btn.
When you press on it, the color parameter is passed to the makeText function.

What i would like it to do, is when you press on button 1, a text is added to the dynamic
textfield debug_txt with the color that is passed. And when you press the button 2, the
text that was added in the first place stay's this color. And another sentence is added with
the color that is passed trough button2.

But what i created does not work.. Does anybody have experience with this?

This is the code i have so far:

function makeText(inputColor) {
var fmt:TextFormat = new TextFormat();
fmt.color = inputColor;
debug_txt.text += "this text should be changed to the input color?"+newline;
debug_txt.setTextFormat(fmt);
}


button1_btn.onPress = function() {
makeText("0xFF0000");
}
button2_btn.onPress = function() {

makeText("0xCCCCCC");
}




Regards,

Multiple Colors On Dynamic Text Field?
is there a way to apply a different color (and other things) to a word i'm loading into a dynamic text field through a variable? i'm using this code:


Code:

myformat = new TextFormat();
myformat.color = 0x000000;
myformat.bold = true;
myformat.font = "Arial";

format2.color = 0xFF0000;
format2.bold = true;
format2.font = "Tahoma";
format2 = "dynamic";

textbox2.text = "This is a " + format2 +" text field";
textbox2.setTextFormat(myformat);
this is returning an all black line of text that says "This is a dynamic text field"

i'm trying to make the word "dynamic" be a different color, preferably without the use of an external css file since the client would like to only receive one swf), but if that's the only way i'll try it.

thanks!

Datagrid Multiple Selection
I have a datagrid with multipleSelection=true.

I just want to trap how many options the user has selected.

How can I trap this.

I want the users to selects 10 options. If they don't then a message box will appear asking them to select 10 options.

Thank you in advance

Datagrid Multiple Selection
Hello

My client wants to have a possibility of multiple selections in a datagrid... but he wants to have them selected by a simple click instead of the "classical" ctrl click... how can I achieve that ?

Henri

Datagrid Multiple Selections
How do i go about dealing with multiple selections within a datagrid?

Any tutorials or examples.

Thanks

Dave

Datagrid Multiple Select Bug?
if i shift select from bottom to top it works, but if i shift+slect from top to bottom it dont remove the rows i had selected

is this me or flash?

Default Multiple Selection For Datagrid
Can I select a row or multiple rows by default for Datagrid component. I tried

myDataGrid.selectedIndex = 1;
myDataGrid.selectedIndices = [0,1,2];

But it's not working.

I tried the same code with List component and it is working fine.

Please let me know if it works with Datagrid

Datagrid Sorting On Multiple Columns
I have a datagrid with multiple columns.
I can click a column header to sort the rows, but I don't know how to sort on two or more rows. For example, last name, age, then racing time.

Any clue?
THanks

DataGrid Multiple SelectedItems Problem
Code:

import fl.controls.*;
import fl.controls.dataGridClasses.DataGridColumn;
import fl.data.DataProvider;

var dp:DataProvider = new DataProvider();
dp.addItem({col1:"item 1.A", col2:"item 1.B", col3:"item 1.C"});
dp.addItem({col1:"item 2.A", col2:"item 2.B", col3:"item 2.C"});
dp.addItem({col1:"item 3.A", col2:"item 3.B", col3:"item 3.C"});
dp.addItem({col1:"item 4.A", col2:"item 4.B", col3:"item 4.C"});

var myDataGrid:DataGrid = new DataGrid();
myDataGrid.addColumn("col1");
myDataGrid.addColumn("col2");
myDataGrid.addColumn("col3");
myDataGrid.dataProvider = dp;
myDataGrid.setSize(300, 110);
myDataGrid.move(10, 10);
myDataGrid.allowMultipleSelection = true;
addChild(myDataGrid);

var resultButton = new Button();
resultButton.move(10, 130);
addChild(resultButton);
resultButton.label = "Result";
resultButton.addEventListener(MouseEvent.CLICK, getResult);

function getResult(e:Event){
//here i need multiple selected item data
trace("result: " + myDataGrid.selectedItem.col2);
}
here iam trying to trace multiple seleted items data, i tried myDataGrid.selectedItems.col2, but its not working..... How can i do this ?.....
Could u please help me................

thanks in advance,
shabeer...

DataGrid Multiple SelectedItems Problem
Code:

import fl.controls.*;
import fl.controls.dataGridClasses.DataGridColumn;
import fl.data.DataProvider;

var dp:DataProvider = new DataProvider();

dp.addItem({col1:"item 1.A", col2:"item 1.B", col3:"item 1.C"});
dp.addItem({col1:"item 2.A", col2:"item 2.B", col3:"item 2.C"});
dp.addItem({col1:"item 3.A", col2:"item 3.B", col3:"item 3.C"});
dp.addItem({col1:"item 4.A", col2:"item 4.B", col3:"item 4.C"});

var myDataGrid:DataGrid = new DataGrid();
myDataGrid.addColumn("col1");
myDataGrid.addColumn("col2");
myDataGrid.addColumn("col3");
myDataGrid.dataProvider = dp;
myDataGrid.setSize(300, 110);
myDataGrid.move(10, 10);
myDataGrid.allowMultipleSelection = true;
addChild(myDataGrid);

var resultButton = new Button();
resultButton.move(10, 130);
addChild(resultButton);
resultButton.label = "Result";
resultButton.addEventListener(MouseEvent.CLICK, getResult);

function getResult(e:Event){
//here i need multiple selected item data
trace("result: " + myDataGrid.selectedItem.col2);
}

here iam trying to trace multiple seleted items data, i tried myDataGrid.selectedItems.col2, but its not working..... How can i do this ?.....

Could u please help me................

thanks in advance,
shabeer...

Datagrid Multiple Selection Without Holding Ctrl Key
Is there any way for multiple selection in datagrid without holding down Control Key?

[F8] Pass Multiple/different Xmls From Listbox To Datagrid
I would REALLY APPRECIATE any help on this:

I currently have a listbox that passes different xmls to a playlist for an mp3 player. (the items value is the same name as my xml files. EXAMPLE mylistBox.addItem("Clinton, Hillary", "Hillary") //Hillary.xml)...This works fine!

What I cannot get to work is using the same listbox to pass the xmls to a datagrid.

Here is the code for the listbox (which is on level 1):

Code:
onSelect = function () {
text = mylistBox.getValue();
_parent.data_xml = new XML();
_parent.data_xml.ignoreWhite = true;
_parent.data_xml.onLoad = _parent.ladeDaten;
_parent.data_xml.load(mylistBox.getValue()+'.xml');
}


Here is the code for the datagrid:

Code:
var data_xml:XML = new XML();
data_xml.ignoreWhite = true;
data_xml.load(mylistBox.getValue()+'.xml');
data_xml.onLoad = dataload;

function dataload(){


If I just load the "Hillary.xml" with the data_xml.load function, it will load up that individual xml...just can't get it to load the ones passed from the listbox.

Again, any help would be GREATLY APPRECIATED!

Thanks,
Kumba

Flex How To Use Multiple Checkbox Selections To Filter Xml Data & Populate The Datagrid?
hi,
i am using adobe flex builder 3 to build a simple tool that lets user to extract data according to his needs .i have an xml file that contains information about plants. i have reached a stage where the user interface is ready. i have 4 vertical boxes each with its own set of checkboxes.when i check on one or more of the checkboxes(verticalbox-1), it gives me the result. but it doesnot take into account the other checkboxes selected in the other vertical boxes.I dont know how to proceed further...that is when i select the checkboxes in the other 3 sets of vertical boxes, how to get the data in the datagrid corresponding to the selection made.... a vry important point to be noted is that the user can make any no of selections in the checkboxes in any vertical box, the data satisfying the selection should be displayed in the datagrid. I am attaching the xml file and the mxml file..pls help me solve the issue

Setting Colors With .setRGB (myColor); What Is The Code To Set The Colors 0xRGBB?
sliderColor = new Color(sliderButton);
trackColor = new Color(track);
arrowColor = new Color(arrows);
sliderColor.setRGB(myColor);
trackColor.setRGB(myColor);
arrowColor.setRGB(myColor);

hmm...i got a scroller that i want to turn white and black
this is what it is set to..
what is the code ? is it hex color code? this is weird

help would be appreciated thanks.

Controlling Multiple Fill Colors Frame By Frame...
I have multiple instances of Movie Clips, which contain frame by frame animations of a person, the animations consisting of outlines, and color fills for the shirt, pants, and skin. I want to have the color fills for the shirt, pants, and skin be different colors, generated randomly for each instance of the movie clip.

So far, I've been been separating the shirt fill, pant fill, and skin fill in their own separate MC's, layered beneath the frame by frame outline. This process is really tedious, as the color fills themselves change form frame by frame with the outline, and it's a hassle to properly align all the color fill MCs with the outline. I'm wondering if there is an easier way to control the separate colors with actionscript.

I'm fairly adept with actionscript, but for some reason, the solution isn't quite emerging to me...

Does this make sense? Something like this:
http://www.radiolights.com/chase/pants.htm

Flash Colors Vs. HTML Colors
I'm having a issue with the colors on a client site we created matching up. I think this is a pretty unique problem. Here is the url: URL I created the flash to appear as if it was under the swoosh, but to give the masking effect of the images are appearing from under the swoosh I had to include part of the swoosh in my flash movie. By doing that I have a color issuse on monitors using 16 bit color. My boss is getting on my case to try and find an answer for this problem and he is the type that doesn't take no for an answer. He wants it fixed and that's the way it is! If anyone could ge me an advice that would be greatly appreciated!

Colors In JPG And Colors In Flash
Hi, I recently made a website and I have images that I want to transfer seemlessly from JPG to Flash. My website is http://www.Sergprotector.com/2. However you will notice that the JPGs along the borders are not the same as the flash image. Is there any way I can avoid this? Flash blunder? Thanks

How To Get The Inbetween Colors Between Two Colors?
Howdy...

I was just wondering if anybody know effective ways to get the inbetween values between two color values... I am trying to create a function that changes the backgroundColor of the text field from one color to another, for example...

For example, 0x000000 and 0xFFFFFF... Say I want 4 inbetween colors... Then it will be 0x333333, 0x666666, 0x999999, 0xCCCCCC, right???

What about 0xFF0000 and 0x0000FF??? Or, what about 0x000000 and 0x0000FF??? What would be the logic behind it??? I just can't get my brain working... What would be the logic behind it???

Dragging And Dropping From Datagrid To Datagrid
Yebo!

Is it possible to drag and drop items(cells?) from one datagrid to another?

Thanks
Renay

[F8] Datagrid In A Datagrid Column
Hello everyone,

Can someone give me a hint on how to solve the next problem ? I want to display a datagird (the 'child') in a column of another datagrid (the 'parent'). The content of the 1st 'child' datagrid is dependent on the value of the first column and row in the 'parent', etc. ect.
Example : first row in the parent-datagrid is a specific library, the child-datagrid in the first row shows the books available in this library. The second row in the parent-datagrid is another library, and the child-datagrid in the second row has to display the books available in this specific library.

The data to 'feed' both datagrid is coming from XML.
Someone out there who can give me a hint/link ?

I know this can be easily done using Flex/AS 3, but that is (sigh) not possible for this project....

Thanks in advance

Help Colors
HI

I'm not too familiar with the swatches that come with Flash, I went to a page on the net where this company took their time to put together a websafe palette organized by colors so is easier for designer to use.

Could you take a look to this page http://www.lynda.com/hex.html and tell me what do you think about this palette.
Tell me if you think is worth to go through all the trouble of adding color by color into a Flash swatch or if is not worth it becuase the web safe color swatch that come with flash 5 are better and if is so witch of the color palette that come witch Flash 5 should I use for the net?.

Thanks

Alex

[Edited by QBA on 10-10-2001 at 03:38 PM]

Colors...
I need help. if anyone knows how to change the color of an object in the middle of a movie, can you please tell me. I'm not sure how to use the color actions...

I'm Seeing Colors
For some reason when I set the RGB of a movie clip to one color in flash and set it to the same value in actionscript (setRGB(0x000066)) the colors don't match. Could someone shed some light on this issue. I thought that maybe flash converts your colors to websafe colors but cannot do the same for colors set by actionscript at runtime but this is really just a wild guess. Thanks in advance.

Colors
Hi
When stack colors (a movie clip on another) the colors don't mix, it is a slight darker. Thing that doesn't happen in flash 5.
Is there any transparency factor that I should rule somwhere.
Please help

BG Colors... Plz Help...
Hey all,
I was just wondering how to set a color for rhe BG of your movie... I use Modify > Movie > Background Color. But from there I can only use a limited amount of colors. I need a color that isn't in the choices so I waas wondering how I could set that up. Any help would be greatly apreciated... Thanks alot... Later

Because I Need The Pic First With The Colors
and after click on the mouse the colors need to be change to only Black & White colors.

To import 2 pics ,one with colors and another without colors it's not good because i have many pics to import.

Thank's

Colors
Dear Flashers
I have 7 buttons with 7 colors, (red, green, yellow,..etc)

and i have a movie clip

i want that when i click the red button the mc should fade to red, then when i click yellow, i want it to fade from red to yellow, then when i click green, it should fade from yellow to green ... etc.

how is that done?
(flash 5)
Thanks

RGB-HSB Colors
Hi,
Is there any method in flash available to convert RGB - HSB color values and Vice versa.

Using Non Web Colors
I was wondering what would happen if I don't use "web colors" for my vector graphic in the flash movies, what would happen if someone's monitor has only 256 colors? Is it up to the internet browser or the monitor, how many colors does the browser contain anyways.

thanks.

Colors
How can I paint a color that gradually shifts into another, like blue to orange?

Colors
How can I get the exact code from each channel (color+offset+alpha) from a object and then assign each code to different variables?
I really really need help to solve this one.

ColorS
Hey hey!!!!!!

Is there a function that returns the color value at a certain coord. ?

I am trying to make a color selector, and the user and just click on the color wheel, and whatever color is under the _xmouse and _ymouse is stored in a variable.

Thanks!

Colors Help
I am making a website for my father's restaurant. I am really really bad with colors. Can someone help with the background color of flash, background color of the html thingy and the text color? I am looking for something green.

Bg Colors In Pop-up
When opening new window with .jpg via Flash button, how to make the background color of that window different and how to make the picture to be centered?

Colors
Ok lets say I have a square divided into four parts. One part is say "0x400320" etc... How can I change that part of the square by identifying what color it is and what to set it to? I cannot seperate it into different mc's either.

Colors
How do you change the transparency of a color?

Colors
What I am about to say may shock you. It's a really really really really REALLY stupid question. You might think I'm retarded for asking it. Maybe I'm just lazy. But I'm asking it anyways.

How do I add color to text. Can I do that? In flash? I'm sure theres a way....I've done it before...Maybe...

Thats right. Told you it was a stupid question.

so..very...dark and..and...noobish...

Copyright © 2005-08 www.BigResource.com, All rights reserved