PDA

View Full Version : [Styles] How to lose this pixel border?


elspif
10-15-2004, 11:44 AM
Don't look at the ugly colors. ;-)
You'll notice an extra pixel-slither between the items in the list and the border of the ScrollSelectList. Where does this pixel come from and how do I get rid of it? It is my bane.. an evil thorn that risedes in me driving me mad!!

I have the following code that makes the background transparent:
_global.styles.ScrollSelectList.setStyle("backgroundColor" , undefined);
_global.styles.ScrollSelectList.setStyle("borderStyle" , "none");
_global.styles.ComboBox.setStyle("borderStyle" , "solid");

This shows me that the pixel-slither is part of the SelectScrollList and not the list items herein. However anything I've tried has failed to eliminatte the pixel-slither-death-thorn. Perhaps I'm not using the right style or style object, or perhaps this is hardcoded in an offset value somewhere or maybe it's something that can only be obtained with creating a custom skin...

Who can help me rid me of this demon???
Thanks

elspif
10-16-2004, 10:49 AM
One more thing...

How to remove the white background in the actual comboBox field, i.e. make it transparent?
[I mean the white background you see when the combobox is closed...]

I have the following code to make the bg within the combobox transparent but apparently there is still a class or item or whatever behind the comboBox:
_global.styles.ComboBox.setStyle("backgroundColor" , undefined);

If you have the answer... this really is making me go mad...
and since thursday I'm an official Certified Developer!!! Woohoo!

Thanks for help, if it comes.... ;-)

elspif
10-16-2004, 08:52 PM
Mhauahahaha I Am The Evil Pixel Thorn....

Anyway it's dead the pixel. Using a work around but still....
Basically I kill the pixel by manually subtracting it from an x value like this:





//::: MAIN LAYOUT METHOD. Find a delta, make the adjustment to the number of rows, and their width

function layoutContent(x : Number,y:Number,w:Number,h:Number) : Void
{
//trace("ScrollSelectList.layoutContent - x:" + x + " y:" + y + " w:" + w + " h:" + h );
delete invLayoutContent;
x = x-1;

.... etc ....


This code is in the mx.controls.listclasses.ScrollSelectList class. The part I added was x = x-1; to remove the evil pixel.

Now as to the other issue of the background color of the button of the ComboBox. Basically you need to modify the ButtonSkin element since it is a button, it gets drawn by ActionScript in the mx.skins.greyElves.ButtonSkin class by various drawRoundRect function calls. So basically I needed to add a new theme for at least the ButtonSkin class (which means adding an item exportID of "ButtonSkin" and an ActionScrip 2 class that links to the buttonSkin actionscript file you have)

Anyway documentation on this is kind of hard to find even though it is all there.

Hope this helps anyone looking for the same issues.