Hey Tom,

I can't reproduce your issue. Using the code below, the 
border toggles off and on, and the panel retains its 
rounded corners. Perhaps I misunderstood the nature of 
your question?

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute" borderStyle="solid">

<mx:Script>
<![CDATA[
private var foo:Boolean = true
private function swapBorder():void {
if(foo){
//Remove border
pnlUgly.setStyle("borderThickness",0);
}else{
        //Replace border
pnlUgly.setStyle("borderThickness",2);
pnlUgly.setStyle("borderColor",0xff8040);
}
foo = !foo;
}
]]>
</mx:Script>

<mx:Panel id="pnlUgly" x="177" y="107" width="310" 
height="200" layout="absolute" cornerRadius="10" 
borderStyle="solid" borderThickness="2" 
borderColor="#ff8040" backgroundColor="#00ff00" 
title="Ugly Panel">
<mx:Form x="10" y="10">
<mx:FormItem label="Label">
<mx:TextInput/>
</mx:FormItem>
<mx:FormItem label="Label">
<mx:ComboBox></mx:ComboBox>
</mx:FormItem>
<mx:FormItem label="Label">
<mx:Button label="Button" click="swapBorder();"/>
</mx:FormItem>
</mx:Form>
</mx:Panel>
        
</mx:Application>


On Mon, 12 Jun 2006 16:51:59 -0400
  Tom Fitzpatrick <[EMAIL PROTECTED]> wrote:
> Yes - I tried that. The problem is that the border, even 
>when set to the 
> panel's background color, interrupts it visually - 
>overlaying the panel 
> header, for example.
> 
> It seems that what I need is to redraw or refresh the 
>panel after the 
> border is removed to restore the original look. I just 
>don't know how to 
> do that.
> 
> - Tom
> 
> Jim Robson wrote:
>>
>> Tom,
>>
>> Instead of removing the border, which seems to confuse 
>>the
>> player, could you just toggle the border's color? When 
>>you
>> want the border to disappear, change its color to the 
>>same
>> color as the panel's background. Then change the color
>> back when you want the border to be visible.
>>
>> Will that work?
>>
>> Jim
>>
>> On Mon, 12 Jun 2006 14:48:15 -0400
>> Tom Fitzpatrick <[EMAIL PROTECTED] 
>> <mailto:tom%40streamlinestudios.com>> wrote:
>> > I have a panel with corner radius set to 10.
>> >
>> > I'm trying to turn its border on and off
>> >programatically, toggling the
>> > border styles between solid and none, thickness 
>>between
>> >2 and 0.
>> >
>> > The toggling is working fine, but when I hide the 
>>border
>> >after showing
>> > it once, I lose the panel's curved corner radius and 
>>its
>> >dropshadow.
>> >
>> > Is there some way to just turn the border on and off
>> >while still
>> > retaining the dropshadow and the look of the panel's
>> >corner radius?
>> >
>> > - Tom
>> >
>> >
>>
>>  
> 
> 
> 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to