Display only text field of Numeric Stepper in Flex - actionscript-3

Is there any property of Numeric Stepper in Flex which can be used to display only the text field of Numeric Stepper and hide the arrow buttons? I need to display the complete Numeric Stepper on Mouse Roll over.

In flex 4 create custom skin with new state: over. Create new class NumericStepperExtends extends NumericStepper, listen rollover and rollout events, and change skin state.
NumericStepperExtends:
package classes
{
import flash.events.MouseEvent;
import spark.components.NumericStepper;
public class NumericStepperExtends extends NumericStepper
{
private var _over:Boolean = false;
public function NumericStepperExtends()
{
super();
}
override protected function createChildren():void
{
super.createChildren();
addEventListener(MouseEvent.ROLL_OVER, onRollOverHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, onRollOutHandler, false, 0, true);
}
override protected function getCurrentSkinState():String
{
if (_over) return "over";
return super.getCurrentSkinState();
}
protected function onRollOutHandler(event:MouseEvent):void
{
_over = false;
invalidateSkinState();
}
protected function onRollOverHandler(event:MouseEvent):void
{
_over = true;
invalidateSkinState();
}
}
}
Skin:
<?xml version="1.0" encoding="utf-8"?>
<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:fb="http://ns.adobe.com/flashbuilder/2009" minHeight="23" minWidth="40"
alpha.disabled="0.5">
<fx:Metadata>
<![CDATA[
[HostComponent("spark.components.NumericStepper")]
]]>
</fx:Metadata>
<fx:Script fb:purpose="styling">
static private const exclusions:Array = ["textDisplay", "decrementButton", "incrementButton"];
/**
* #private
*/
override public function get colorizeExclusions():Array {return exclusions;}
/**
* #private
*/
override protected function initializationComplete():void
{
useChromeColor = true;
super.initializationComplete();
}
private var cornerRadiusChanged:Boolean;
private var borderStylesChanged:Boolean;
/**
* #private
*/
override protected function commitProperties():void
{
super.commitProperties();
if (cornerRadiusChanged)
{
var cr:Number = getStyle("cornerRadius");
if (incrementButton)
incrementButton.setStyle("cornerRadius", cr);
if (decrementButton)
decrementButton.setStyle("cornerRadius", cr);
cornerRadiusChanged = false;
}
if (borderStylesChanged)
{
textDisplay.setStyle("borderAlpha", getStyle("borderAlpha"));
textDisplay.setStyle("borderColor", getStyle("borderColor"));
textDisplay.setStyle("borderVisible", getStyle("borderVisible"));
borderStylesChanged = false;
}
}
/**
* #private
*/
override public function styleChanged(styleProp:String):void
{
var allStyles:Boolean = !styleProp || styleProp == "styleName";
super.styleChanged(styleProp);
if (allStyles || styleProp == "cornerRadius")
{
cornerRadiusChanged = true;
invalidateProperties();
}
if (allStyles || styleProp.indexOf("border") == 0)
{
borderStylesChanged = true;
invalidateProperties();
}
}
</fx:Script>
<s:states>
<s:State name="normal" />
<s:State name="disabled" />
<s:State name="over" />
</s:states>
<s:Button id="incrementButton" right="0" top="0" height="50%" tabEnabled="false"
includeInLayout.normal="false" visible.normal="false" includeInLayout.over="true"
skinClass="spark.skins.spark.NumericStepperIncrementButtonSkin" />
<s:Button id="decrementButton" right="0" bottom="0" height="50%" tabEnabled="false"
includeInLayout.normal="false" visible.normal="false" includeInLayout.over="true"
skinClass="spark.skins.spark.NumericStepperDecrementButtonSkin" />
<s:TextInput id="textDisplay" left="0" top="0" right="18" bottom="0"
skinClass="spark.skins.spark.NumericStepperTextInputSkin" />
</s:SparkSkin>
Don't forget add css for bind new component and new skin:
<fx:Style>
#namespace s "library://ns.adobe.com/flex/spark";
#namespace mx "library://ns.adobe.com/flex/mx";
#namespace classes "classes.*";
classes|NumericStepperExtends
{
skinClass: ClassReference("skins.NumericStepper");
}
</fx:Style>

you can create a mask (tutorial here), what is applied when mouse is not over.
so you have to:
1) create a masking object,
2) mask the stepper (stepper.mask = mymask)
3) add rollover and rollout listeners to mask, where you set or remove the mask.

You can try a very simple way: Use mx_internal:
var n : NumericStepper = new NumericStepper();
n.mx_internal::nextButton.visible = false;
n.mx_internal::prevButton.visible = false;

Related

Lose data in draggable List with nested ItemRenderers

I am suffering from this problem for a few days.
There is a List in which you can drag items.
[Bindable] public static var posts:ArrayCollection = new ArrayCollection();
[Bindable] private var dragit:Boolean = false;
protected function lst_itemClickHandler(evt:ItemClickEvent):void {
if (evt.label == 'mousedown') {
dragit = false;
return;
}
if (evt.label == 'mouseup') {
dragit = true;
return;
}
}
<s:List id="list" width="100%" height="100%" dataProvider="{posts}" itemRenderer="postIR" selectedIndex="0" dragEnabled="{dragit}" dragMoveEnabled="true" dropEnabled="true" useVirtualLayout="false"/>
This list have an item renderer (postIR) as part of which buttons, images, TextArea and another Tile List with his item renderer - socIR.
Here is postIR:
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer 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:c="*"
autoDrawBackground="true" creationComplete="itemrenderer1_creationCompleteHandler(event)" maxHeight="120">
<fx:Script>
<![CDATA[
[Bindable] private var index:int;
[Bindable] private var socDP:ArrayCollection;
protected function itemrenderer1_creationCompleteHandler(event:FlexEvent):void
{
index = ((this.owner as List).dataProvider as ArrayCollection).getItemIndex(data);
socDP = Copypaste.socialVector[index] as ArrayCollection;
soc.addEventListener(ItemClickEvent.ITEM_CLICK, soc_itemClickHandler);
}
//Deleted some code
]]>
</fx:Script>
<c:CheckList id="soc" width="100%" height="100%" itemRenderer="socIR" mouseDown="txt_mouseDownHandler(event)" mouseUp="soc_mouseUpHandler(event)"
dataProvider="{socDP}" allowMultipleSelection="true" useVirtualLayout="false" click="soc_clickHandler(event)">
<c:layout>
<s:TileLayout requestedColumnCount="3" verticalAlign="top" padding="5"/>
</c:layout>
</c:CheckList>
//Deleted some code
</s:ItemRenderer>
Here is socIR:
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
autoDrawBackground="true" click="itemrenderer1_clickHandler(event)" creationComplete="itemrenderer1_creationCompleteHandler(event)">
<s:layout>
<s:HorizontalLayout verticalAlign="middle" padding="5"/>
</s:layout>
<s:states>
<s:State name="normal"/>
<s:State name="selected"/>
</s:states>
<fx:Script>
<![CDATA[
protected function itemrenderer1_clickHandler(event:MouseEvent):void
{
if (this.selected) {
data.selected = true;
} else {
data.selected = false;
}
var parentList:List = owner as List;
var e:ItemClickEvent = new ItemClickEvent(ItemClickEvent.ITEM_CLICK, true);
e.item = data;
e.index = parentList.dataProvider.getItemIndex(data);
e.label = "selected";
dispatchEvent(e);
}
override public function set data(value:Object):void
{
super.data = value;
if (value.selected) {
data.selected = true;
} else {
data.selected = false;
}
}
protected function itemrenderer1_creationCompleteHandler(event:FlexEvent):void
{
if (data.selected) {
this.selected = true;
} else {
this.selected = false;
}
}
]]>
</fx:Script>
<s:CheckBox id="socCheck" selected.selected="true" selected.normal="false" mouseEnabled="false"/>
<s:Image source="{'images/socialicons/' + data.icon}"/>
<s:Label text="{data.label}"/>
</s:ItemRenderer>
Everything works fine until I need to drag an items in main List. Selected items in socIR or disappear or randomly shuffled. I used a variety of methods - to store data when changing items in the main class in the vector for each itemrenderers - public static var socialVector:Vector. = new Vector.();
, but it only adds to the confusion. I experimented with useVirtualLayout, but it did not help.
Please any advice how to avoid issue with data loss when drag an item.
Thanks.
PS so looks my list

Create Custom Dialog Box using dispatch events,states and titlewindow in flex/AS3.0

Since a month Iam working on creating a custom dialog box, having parameters like message,state and modal(true/false)
Eg:
showAlert("Hi, how are you doing","Goodmorning", true);
I have learned how to dispatch event. but unable to dispatch the alertevent/popupManager using States.
Below is the code, I am struggling with.
Main.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
public function onclick(event:MouseEvent):void
{
this.dispatchEvent("Hi, How are you?", "Morning", true);
}
public function dispatchEvent(arg1:String, arg2:String, arg3:Boolean):void
{
var str:*=null;
str.message = arg1;
str.stateName = arg2;
str.modal = arg3;
this.dispatchEvent(new ShowAlert(ShowAlert.SHOW, true));
}
]]>
</mx:Script>
<mx:Button id="click" click="onclick(event)"/>
</mx:Application>
ShowAlert.as
package
{
import flash.events.*;
public class ShowAlert extends Event
{
public var _stateName:String;
public var _closable:Boolean;
public var _message:String;
public var _isModal:Boolean;
public static const SHOW:String="show";
public function flash.events.(arg1:String, arg2:Boolean=false, arg3:Boolean=false)
{
super(arg1, arg2, arg3);
trace("arg1: "+arg1+"\t arg2: "+arg2+"\t arg3: "+arg3);
}
public function set message(arg1:String):void
{
this._message = arg1;
}
public function get message():String
{
return _message;
}
public function get modal():Boolean
{
return _isModal;
}
public function get stateName():String
{
return _stateName;
}
public function set stateName(arg1:String):void
{
this._stateName = arg1;
}
public function set modal(arg1:Boolean):void
{
this._isModal = arg1;
}
public override function clone():flash.events.Event
{
return new ShowAlert(type);
}
}
}
I was unable to write the custom titlewindow using states, so I dint post that.
Please let me know, how to make this happen.
Below is the Sample code, specifying my problem
main.mxml:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
public var info:IModuleInfo;
public var loadalert:DisplayObject;
import mx.modules.ModuleManager;
import mx.modules.IModuleInfo;
import mx.events.ModuleEvent;
public function init():void
{
Alert.show("This is forst alert.");
}
public function Loadalerrt():void
{
trace("loadalertmodule");
info = ModuleManager.getModule("../bin-debug/alerrtmod.swf");
info.addEventListener(ModuleEvent.READY, modEventHandler);
info.load();
}
public function modEventHandler(event:ModuleEvent):void
{
trace("modeventHandler");
loadalert=info.factory.create() as DisplayObject;
can1.addChild(loadalert);
}
]]>
</mx:Script>
<mx:Button label="Alert in Application" id="b1" click="init()" x="29" y="21"/>
<mx:Button label="Load Module" id="b2" click="Loadalerrt();" x="10" y="92"/>
<mx:Canvas id="can1" x="409" y="57" backgroundColor="cyan"/>
</mx:Application>
alerttmod.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
public function alertshow():void
{
Alert.show("This is second alert, You Can see it covers whole application, What I want is its scope should be limited to this specific module, not to whole application ");
}
]]>
</mx:Script>
<mx:Button label="Alert in Module" id="b1" click="alertshow()" x="163" y="100"/>
</mx:Module>
Now I see your problem. I think it is not possible to restrict the modal area of the Alert. I can suggest you to fake the modal behaviour by desabling the modules elements while your dialog is being shown.
May be it can help you...
Here are two components to demonstrate it:
//your module with another Alert
<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.managers.PopUpManager;
public function alertshow():void
{
Alert.show("This is second alert...");
}
public function alertshow2():void
{
var customAlert:CustomAlert = new CustomAlert();
customAlert.addEventListener("CLOSED", onCustomAlertClosed);
this.enabled = false;
PopUpManager.addPopUp(customAlert, this, false);
PopUpManager.centerPopUp(customAlert);
}
private function onCustomAlertClosed(evt:Event):void
{
this.enabled = true;
}
]]>
</mx:Script>
<mx:Button label="Alert in Module" id="b1" click="alertshow()" x="163" y="100"/>
<mx:Button label="CustomAlert in Module" id="b2" click="alertshow2()" x="163" y="150"/>
<mx:Canvas width="100%" height="100%" backgroundColor="0xbbbbbb" alpha="0.8" visible="{!this.enabled}"/>
</mx:Module>
//simple CustomAlert as a Panel
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="300" height="200">
<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
protected function button1_clickHandler(event:MouseEvent):void
{
PopUpManager.removePopUp(this);
this.dispatchEvent(new Event("CLOSED"));
}
]]>
</mx:Script>
<mx:Button x="112" y="128" label="Close" click="button1_clickHandler(event)"/>
</mx:Panel>

How avoid focus on a control in Flex?

I have a Custom Component the parent is Group with Horizontal layout, in that i have two controls one is TextInput and other is datefield. When use this custom component in ant place i provide tabindex to that control as a whole.
I want just that if user tab(keyborad) then when focus on the Textinput the focus does't on dateField.
How i achieve this.
Here is my Code.
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="20"
xmlns:components="com.zigron.controls.extended.components.*"
creationComplete="creComp()">
<!--
Author : Tahir Alvi
Date : 11/06/2012
Place : Zigron Inc
-->
<fx:Declarations>
<mx:DateFormatter id="formatter" formatString="MM/DD/YYYY" />
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.controls.TextInput;
import mx.events.CalendarLayoutChangeEvent;
import spark.events.TextOperationEvent;
private var _selectedDate:Date;
private var _text:String='';
private var _propmt:String='DOB';
//---- creation Complete ----------
private function creComp():void
{
id_dob.tabIndex = tabIndex;
}
//--At the initlize of datefield hide the Textinput ---
protected function init():void
{
var tf:TextInput = df.mx_internal::getTextInput();
tf.visible = false;
tf.includeInLayout = false;
}
//-- date change handler ---
protected function df_changeHandler(event:CalendarLayoutChangeEvent):void
{
id_dob.text = formatter.format(df.selectedDate.toString());
text = id_dob.text;
selectedDate = df.selectedDate;
}
// -- Text Input Change handler and apply masking on it -------
protected function id_txt_changeHandler(event:TextOperationEvent):void
{
var s:String = id_dob.text.replace(/[^0-9]/g,"");
id_dob.text = s.substring(0,2) + (s.length>2?"/"+s.substring(2,4) + (s.length>4?"/"+s.substring(4,8):""):"");
id_dob.selectRange(id_dob.text.length, id_dob.text.length);
text = id_dob.text;
if(text.length)
{
selectedDate = null;
}
else
{
text = '';
}
}
[Bindable]
public function get selectedDate():Date
{
return _selectedDate;
}
public function set selectedDate(value:Date):void
{
_selectedDate = value;
}
[Bindable]
public function get text():String
{
return _text;
}
public function set text(value:String):void
{
_text = value;
if(_text.length)
id_dob.text = _text;
}
[Bindable]
public function get propmt():String
{
return _propmt;
}
public function set propmt(value:String):void
{
_propmt = value;
}
]]>
</fx:Script>
<s:layout>
<s:HorizontalLayout horizontalAlign="left" verticalAlign="top" gap="2"/>
</s:layout>
<components:LabelTextInput id="id_dob"
width="100%" prompt="{propmt}" change="id_txt_changeHandler(event)"/>
<mx:DateField id="df"
initialize="init()" width="20" change="df_changeHandler(event)" selectableRange="{{rangeEnd:new Date()}}"
toolTip="Select Date of Birth" yearNavigationEnabled="true" textInputStyleName="mandatoryDateSkin"
maxYear="{new Date().getFullYear()}" minYear="1901"/>
</s:Group>
i had a similar problem with a custom component with a textinput inside him. My solution was create a public var, something like this:
//This is my component MyComponent...
[Bindable] public var fTabIndex:int = -1;
<mx:TextInput id="field" tabIndex="{fTabIndex}"/>
(Other component...)
//Other component
<mx:TextInput tabindex="1"/>
<control:MyComponent fTabIndex="2"/>
I hope it will be helpful.
set enabled = "false";
and change it in code when required.

How to increase horizontalgridline thickness in Flex 3

i have set horizontal gridlines between rows of a datagrid to true. But i'm unable to increase its thickness. how to do it?
There are two ways you can go about solving this. If you check the docs, DataGrid has a horizontalSeparatorSkin style. The docs state that this is undefined by default, and in which case the grid uses it's drawHorizontalLine() method to draw the lines.
So you can either set the horizontalSeparatorSkin style to your own class that extends ProgramaticSkin or extend the DataGrid class and override the drawHorizontalLine() method. Both are fairly easy to do, here's app with an example of each one:
App
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:local="*"
layout="vertical"
creationComplete="onCreationComplete()">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
protected function onCreationComplete():void
{
var dp:ArrayCollection= new ArrayCollection([ { label: "one", value: 1 }, { label: "two", value: 2 }, { label: "three", value: 3 } ]);
grid.dataProvider=dp;
customGrid.dataProvider=dp;
}
]]>
</mx:Script>
<mx:DataGrid id="grid" horizontalGridLines="true" horizontalSeparatorSkin="{HorizontalSeparatorSkin}">
<mx:columns>
<mx:DataGridColumn dataField="label" />
<mx:DataGridColumn dataField="value"/>
</mx:columns>
</mx:DataGrid>
<local:CustomGrid id="customGrid" horizontalGridLines="true" horizontalGridLineColor="#FF0000">
<local:columns>
<mx:DataGridColumn dataField="label" />
<mx:DataGridColumn dataField="value"/>
</local:columns>
</local:CustomGrid>
</mx:Application>
Programatic skin (HorizontalSeparatorSkin.as):
package
{
import flash.display.Graphics;
import mx.skins.ProgrammaticSkin;
public class HorizontalSeparatorSkin extends ProgrammaticSkin
{
public function HorizontalSeparatorSkin()
{
super();
}
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
// draw a line at the bottom of the rectangle defined by
// unscaledWidth and unscaledHeight
var g:Graphics = this.graphics;
g.clear();
g.lineStyle(3, 0x00FF00); // change thickness / color here
g.moveTo(0,unscaledHeight);
g.lineTo(unscaledWidth, unscaledHeight);
}
}
}
Custom grid (CustomGrid.as):
package
{
import flash.display.Graphics;
import flash.display.Sprite;
import mx.controls.DataGrid;
import mx.controls.listClasses.ListBaseContentHolder;
public class CustomGrid extends DataGrid
{
public function CustomGrid()
{
super();
}
override protected function drawHorizontalLine(s:Sprite, rowIndex:int, color:uint, y:Number):void
{
var contentHolder:ListBaseContentHolder = s.parent.parent as ListBaseContentHolder;
var g:Graphics = s.graphics;
g.lineStyle(3, color); // change the thickness here
g.moveTo(0, y);
g.lineTo(contentHolder.width, y);
}
}
}

Flex SkinnableContainer skin access Group inside contentGroup

I have skin class in which I defined a Group inside my contentGroup:
<s:Group id="contentGroup" left="0" right="0" top="0" bottom="0" minWidth="475" minHeight="0">
<s:layout>
<s:HorizontalLayout paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0" gap="2" />
</s:layout>
<s:Group id="group_nav_custom_comp_hgroup_prevnext" left="0" right="0" top="0" bottom="0" minWidth="100" minHeight="0">
<s:layout>
<s:HorizontalLayout paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0" gap="5" />
</s:layout>
<s:Button label="Test Button"/>
</s:Group>
</s:Group>
Now, in my CustomComponent that extends the skin class above I am trying to access the "group_nav_custom_comp_hgroup_prevnext" (which is the child group inside the contentGroup) so I can add elements to it at runtime:
public class GroupNavCustomContainer extends SkinnableContainer
{
private var m_group_prev_next:Group = null;
private var m_bAdded_btns:Boolean = true;
private var _prevbtn:UIComponent = null;
public function GroupNavCustomContainer()
{
super();
setStyle("skinClass", GroupNavCustomSkin);
}
//----------------------------------
public function set prevBtn(ui_comp_prev:UIComponent):void
{
if(m_group_prev_next)
{
_prevbtn = ui_comp_prev;
m_bAdded_btns = true;
invalidateProperties();
}
}
//-------------------------------------------------------------------------
override protected function partAdded(partName:String, instance:Object):void
{
trace("In partAdded");
if(partName == "contentGroup")
{
var group:Group = instance as Group;
var visualElem:IVisualElement = group.getElementAt(0);
m_group_prev_next = visualElem as Group;
}
super.partAdded(partName, instance);
}
//------------------------------------------------------------------------
override protected function commitProperties():void
{
super.commitProperties();
if (m_bAdded_btns)
{
m_bAdded_btns = false;
m_group_prev_next.addElement(_prevbtn);
}
}
}
The result is my: group_nav_custom_comp_hgroup_prevnext is just not showing up at all, evidenced by the fact that the button present in it at compile time is not visible. Anyone know how to get it to show up? - thx! -Mike
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Ok I added my sub group as a skin part:
[SkinPart(required="true")]
public var group_nav_custom_comp_hgroup_prevnext:Group;
so now I can access it from anywhere in the CustomComponent. But the button inside the 'group_nav_custom_comp_hgroup_prevnext' still doesn't show up . Any one know why?
package com.viiv.digi.views.navigation
{
import mx.core.IVisualElement;
import mx.core.UIComponent;
import skins.GroupNavCustomSkin;
import spark.components.Group;
import spark.components.SkinnableContainer;
public class GroupNavCustomContainer extends SkinnableContainer
{
private var m_group_prev_next:Group = null;
private var m_bAdded_btns:Boolean = false;
private var _prevbtn:UIComponent = null;
[SkinPart(required="true")]
public var group_nav_custom_comp_hgroup_prevnext:Group;
public function GroupNavCustomContainer()
{
super();
setStyle("skinClass", GroupNavCustomSkin);
}
//----------------------------------
public function set prevBtn(ui_comp_prev:UIComponent):void
{
_prevbtn = ui_comp_prev;
m_bAdded_btns = true;
invalidateProperties();
}
//------------------------------------
public function get prevBtn():UIComponent
{
return _prevbtn;
}
//-------------------------------------------------------------------- -----
override protected function partAdded(partName:String, instance:Object):void
{
trace("In partAdded");
super.partAdded(partName, instance);
}
//-------------------------------------------------------------------- ----
override protected function commitProperties():void
{
super.commitProperties();
if (m_bAdded_btns)
{
m_bAdded_btns = false;
group_nav_custom_comp_hgroup_prevnext.addElement(_prevbtn);
}
}
}
}
The contentGroup should contain the elements added to the SkinnableContainer, and nothing else. This is managed in the parent component, not the skin. So you would add the "group_nav_custom_comp_hgroup_prevnext" Group component definition right below the contentGroup and then reference it in the GroupNavCustomContainer.