Flex :: Spark BorderContainer - Draw Border For Specific Sides?
Dec 6, 2010
Is there a way to easily specify on which sides a border is drawn for Flex 4's Spark BorderContainer?[URL]But that uses MX styling which seems like a hack. Is there a better or 'correct' way without having to build a skin? It seems incredibly silly to build a skin for a 'Bordered' component when this is a very common use case.
View 1 Replies
Similar Posts:
Dec 13, 2011
I have a skin class whose host component is a Toggle Button. I need to be able to add a border around it but only on the top, left, and right sides, As I understand it you have to the: <s:Line> component. So I added:
<s:Line left="0" top="0" right="0">
<s:stroke>
<s:LinearGradientStroke rotation="180" weight="2" caps="square">[code].....
This worked for the top line , But I can't seem to get the left and right lines. I tried: this for the left side line, but it did not work (no line showed up):
<s:Line left="0" top="0">
<s:stroke>
<s:LinearGradientStroke rotation="90" weight="2" caps="square">[code]....
How can I achieve the 3 Lines around the button?
View 1 Replies
Sep 29, 2011
How to create horizontal layout container like HGroup but with border and border radius?In this example there is some default height:
<s:BorderContainer width="100%" borderWeight="2" cornerRadius="5">
<s:layout>
<s:HorizontalLayout/>
[code]....
I want it to have height of the heighest element in container. Like in HGroup. Add: Why is height for above example BorderContainer equal to 112 ?
View 2 Replies
Sep 2, 2010
protected function lbHideQuery_clickHandler(event:MouseEvent):void
{
if (lbHideQuery.selected)
{
[Code]....
View 1 Replies
Jan 21, 2011
Is it possible? Or do I need to use Skin architecture? I can't found the property border color, so I think I need to create a entire skin customized? Or are there the property accessible by css?
View 2 Replies
Jun 29, 2011
I have a custom skin applied to a Flex 4 spark datagrid. One really annoying issue I am having is finding the ability to override or change the selected row border color. I was able to set the selectionColor just fine but the border is still the default light blue color. I need it to be yellow.
Anyone know where I can find this style or override this border that is being set when selection happens within the skin itself.
View 2 Replies
Jun 10, 2011
I am facing some problems with publishing of flash file. After publishing at HTMl; it shows white border at all sides of document. My document size is Width :- 1280 Height : 650. It is adding border on all sides border at top and bottom are greater than that of Left and Right. I have tried it many ways, altered my flash setting as well but no use. I am really stumped due to this. To my surprise at SWF file it showing perfect match and fit exactly into window (not showing any borders like HTML) I dont know exactly from where it is getting white borders. My Publish Setting Are as follows Flash :-
[Code]...
View 5 Replies
Mar 16, 2011
Let's assume I have an Image that's used a button. By default, the image has no border around it. Clicking on this Image will cause another component be displayed beneath it or next to it. When the second component is displayed, I want to draw a joined border around the Image and the second component.
The second component would not be visible by default. It would only be visible after clicking on the Image by using the popupManager, PopUpAnchor, setting the visible property, etc.
Example before clicking:
+--------------------------------+
| |
| XXX <-- My Image |
| XXX |
| |
| |
| |
| |
| |
| |
| |
+--------------------------------+
Example after clicking:
+--------------------------------+
| +---+ |
| |XXX| <-- My Image |
| |XXX|_______________ |
| | | |
| | My Second | |
| | Component | |
| | | |
| | | |
| +-------------------+ |
| |
+--------------------------------+
How difficult would it be to create something like this?
View 2 Replies
Mar 21, 2011
Draw rectangle with dashed border in flex ?
View 3 Replies
Jan 3, 2011
I have been doing much research on this - including creating a custom skin but cannot seem to be able to do it. I just want to have one border around both the checkbox and label. I also want a background color which I did manage to via opaqueBackground property (setting it via AS3). Just can't seem to find the key to have a border as well.
View 1 Replies
Apr 5, 2011
My basic requirement is to draw a circle inside a BorderContainer with the layout set to BasicLayout.I run this method in the CREATION_COMPLETE event of the BorderContainer object.[code]I know I must be missing something VERY basic here. Can I just draw like this OR should I draw in some other event? I know that I can create a Ellipse object and easily add it to the border container but I would like to know how I can do this using the graphics object.
View 3 Replies
Apr 26, 2011
I would like my spark ItemRenderer to be able to render a varying number of graphical objects that depends on the user input. As an example, let's say that I want to render a set of ellipses on a line.I've been using MXML for my most recent batch of ItemRenderers and have loved every minute of it, but I'm not sure how to accomplish the above goal with an MXML IR. In Actionscript I can acquire the list of ellipses locations and draw them programmatically in the updateDisplayList method. Is there an equivalent in MXML?
View 1 Replies
Aug 23, 2010
I have a Spark TextArea:
<s:TextArea id="editor">
<s:textFlow>
<s:TextFlow id="_tf" >
<s:p>Lorem ipsum etc.</s:p>
[code]...
But still no joy in inserting into the middle. Also, the above code wouldn't replace highlighted text, but that's not the real concern here.Based on Eugene's link the key to this is EditManager.The following code represents the working updated function:
protected function imageBtn_clickHandler(evt:MouseEvent):void {
var em:EditManager = editor.textFlow.interactionManager as EditManager;
em.selectRange(editor.selectionAnchorPosition, editor.selectionActivePosition);
[code]...
View 1 Replies
Sep 28, 2011
I want to have a different coloured stroke (outline) used on the pie wedge under the mouse from the outline used on the other wedges.
The PieSeriesItem referenced by the mouseover event doesn't have a stroke parameter, and it looks like it is an all or nothing deal with the outline colour on the whole pie.
Is there any way of specifying the stroke parameter on a specific wedge?
View 1 Replies
Aug 25, 2009
Is there a way to draw a line on a graph (or at least get the position) on specific date?
I have a graph where X is Date data, I want to draw a line with a text on each Year and each 3 months as reference, not part of the graph series.
View 1 Replies
Apr 20, 2007
I have a template which loads thums form XML file, i want to modify the thumbs to have a border around each one and alfa rollover effect.
Code:
function createThubmnail(thumbURL) {
thumbsHolder.attachMovie("itemPhoto", "itemPhoto"+photoN, photoN);
eval("thumbsHolder.itemPhoto"+photoN).picture.picture.loadMovie(thumbURL);
eval("thumbsHolder.itemPhoto"+photoN).d_w = widthThumb;
[code]....
View 2 Replies
Feb 1, 2004
Here's my latest attempt at rendering a dynamic rectange (w/ width, height, border_width, border_color & background_color) I'm trying to render a dashed border, and can't seem to get the code right...
I've reworked my logic about five times, and can get the dashes to render right (almost) but the fill color disappears. It's rendered using actionscript. You can see the issues if you change the border width.[code]...
View 3 Replies
Nov 5, 2007
how to draw a border around image or movie clip?
View 11 Replies
Jan 20, 2010
I'm trying to write some ActionScript which will accept a mask and an image, then mask the image and put a border around the result (assuming that the mask is always 100% opaque).
For example, if my mask is a poorly drawn star, and my image is a bunch of flowers, I want the result to be a poorly drawn star with flowers inside it and a border around it. Something like this:
View 2 Replies
Mar 25, 2006
I'm trying to draw a filled rectangle with no border. Here's the code for my test project:
ActionScript Code:
myMC = this.createEmptyMovieClip("", this.getNexthighestDepth()-1);
myMC._x = 0;
[Code].....
If you take a look at the coordinates, this was suppose to draw a 180x22. Well, it looks lika it draws a 180x22 rectangle, but only if the zoom is at 100%. If I zoom in on the flash player, there are two problems:
1) the line, as it is scaled, goes over the shape edge. Basically, as the border line has 1 pixel, Flash starts do draw it half pixel up and half pixel left; 2) the rectangle is in fact a 179x21 pixels, instead of the 180x22.
I'm sending an example project on an attachment. In this example I have 2 vertical rectangles which act as buttons:
1) the first button draws the rectangle step-by-step;
2) the second button cycles through 3 different styles:
2.1) line with 1 pixel, normal border rescale. This is the style at start;
2.2) no line;
2.3) line with 1 pixel, no border rescale.
The background is a checker texture, with 1 pixel per square. This gives you a perfect look on how the line is drawn.
The drawing instructions are executed on the yellow movieclip, which serves as reference, considering that it has the desired dimensions (180x22). *
If you zoom a couple of times you'll be able to see the problems I'm experiencing.
All you have to do is to click the first vertical button several times to draw the lines, to press the second vertical button to reset the draw and to change the border style, and finally to look at the draw with some zoom in, in order to see it in detail.
So, what can I do in order to draw a perfect rectangle, meaning that the border will not go outside the shape (it would be nice that when the border is rescaled, it does it inside the boundaries of the shape) and the rectangle has right dimensions (why am I missing one pixel in each direction?).
* By the way, is there a way to draw in a movieclip using the lineTo in such a way that the drawing is on the topside instead of the bottomside? I had to make the yellow rectangle partially transparent in order to see my drawing.
View 9 Replies
May 25, 2011
how to draw border for even/uneven shape object? it is stored in a movieclip
View 0 Replies
Jun 17, 2010
I can't post images yet: [URL]. Using Actionscript 3 I'm drawing multiple Shapes onto a MovieClip [top drawing]. The end result I need is the bottom drawing. I originally thought it would be simple to just merge the shapes and then find a way to draw a border around the end result but I can't seem to find any way of doing this. Is this possible or is there a better way of trying to do this?
View 1 Replies
Feb 1, 2004
Here's my latest attempt at rendering a dynamic rectange (w/ width, height, border_width, border_color & background_color) I'm trying to render a dashed border, and can't seem to get the code right...
I've reworked my logic about five times, and can get the dashes to render right (almost) but the fill color disappears. It's rendered using actionscript. You can see the issues if you change the border width... Anyone mind taking a look to see what I'm doing wrong? It seems like the moveTo function isn't behaving right when I get to the end of each line.
[Code]...
View 3 Replies
Oct 6, 2011
Here's my test application:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"[code]....
I would expect the mask to be applied when the checkbox is selected, and removed when it issin't. But it doesn't seem to work.However, when you change to , it works like a charm. Can anyone explain to me why?
Note: In my actual application, i'm applying this in a skin to a component that is extending SkinnableComponent which can't use BorderContainer so a solution to this would be great.
View 1 Replies
Sep 12, 2011
I am searching for a way to have my spritevisualelement have round corners so that it is displayed in a circular shape.The SpriteVisualElement contains a Video Stream from FMS to display but I do not want it to be rectangular.[code] But the Container keeps being in the background and the whole remote Video which is displayed in the "vid" (=id) is in the foreground.How can I set the Container to be in Foreground? then just setting whole application background would do the job.
View 1 Replies
Oct 7, 2010
I'm trying to change the background color and or text color of a BorderContainer in flex 4 using Action Script, but have not idea how to. The Border Container component doesn't seem to have any properties like:
idname.color = "#333333";
idname.backgroundcolor = "#333333";
How might I go about doing this?
View 2 Replies
Jul 9, 2011
I need to round at only the top or bottom of a border container not all four corners, is their some CSS that I can use or do I have to create two new skins. I was reading their used to be a property for this for HBox back in the old days, is their not a property for BorderContainer now?
View 1 Replies
Sep 4, 2011
It seem when I trying to drag the bordercontainer to move along x-axis position on mouse down. It appear to move stable but became jerky when I drag a little faster.Any way to get bordercontainer move with smooth motion?[code]
View 2 Replies
Dec 26, 2011
I would like to have a bordercontainer in Flex, that the user can resize on his own with 8 dots in the top left, top, top right, left, right, bottom left, bottom and bottom right (like MS Paint etc.) Does Flex have a default solution for this, or do I have to write it myself?
View 1 Replies
Jul 1, 2011
I have a renderer that looks like this:
[Code]...
Loading thumbnails using this method works perfectly. The issue happens when you scroll the List.
View 1 Replies