2 Replies Latest reply on Sep 13, 2009 11:44 PM by FrodeHansen

    Skinned button not showing defaultButton border

    FrodeHansen

      When i set the "defaultButton" property on a form to a skinned button (skinned with images), the border won't show. Am I missing something basic, or is it just the way it is? If I turn of the skinning, the border shows nicely.

        • 1. Re: Skinned button not showing defaultButton border
          babo_ya Level 3

          code? or sample code?

           

          BaBo,

          • 2. Re: Skinned button not showing defaultButton border
            FrodeHansen Level 1

            Here are some code which shows the problem. It's not important which images is used. Click in the TextInputs and see the difference. In the first version nothing happens, while in the other, the default button receives a border indicating this is the default button.

             

                <mx:Style>
                    Button.processButton {
                        upSkin: Embed(source="pb_up.png",scaleGridTop="6",scaleGridLeft="6",scaleGridRight="119",scaleGri dBottom="35");
                        overSkin: Embed(source="pb_over.png",scaleGridTop="6",scaleGridLeft="6",scaleGridRight="119",scaleG ridBottom="35");
                        downSkin: Embed(source="pb_down.png",scaleGridTop="6",scaleGridLeft="6",scaleGridRight="119",scaleG ridBottom="35");
                        disabledSkin: Embed(source="pb_disabled.png",scaleGridTop="6",scaleGridLeft="6",scaleGridRight="119",sc aleGridBottom="35");
                    }
                </mx:Style>


                <mx:HBox width="500">
                   
                    <mx:Form defaultButton="{ btDefault }" label="Not working">
                        <mx:FormItem width="100%" label="Input">
                            <mx:TextInput/>
                        </mx:FormItem>
                        <mx:FormItem>
                            <mx:Button id="btDefault" styleName="processButton" label="Continue"/>
                            <mx:Button id="btCancel" styleName="processButton" label="Cancel"/>
                        </mx:FormItem>
                    </mx:Form>
                   
                    <mx:Form defaultButton="{ btDefault2 }" label="Working version">
                        <mx:FormItem width="100%" label="Input">
                            <mx:TextInput/>
                        </mx:FormItem>
                        <mx:FormItem>
                            <mx:Button id="btDefault2" label="Continue"/>
                            <mx:Button id="btCancel2" label="Cancel"/>
                        </mx:FormItem>
                    </mx:Form>
                </mx:HBox>