Alex,

It gets clipped but I know its expanding because I have used 
resize effect to observe it in slow mo. Its like the renderer is having problem 
drawing part of the window region. Tried using the latest SDK/Flash Plugin. 
same thing.

Screenshot of it looks like exactly :
http://www. geocities.com/poweribo/clipped.png
Should be like this:
http://www. geocities.com/poweribo/clipped2.png

It turns out that the problem was more of PopupButton issue.
It behaves as expected if TitleWindow is not a child of popup.


On a somewhat related note, there is another serious prob with PopUpButton
when used with ViewStack. The value of popup attribute of PopUpButton
mysteriously gets set to null when you navigating thru the view stack.
I'm actually surprised the issue was "closed" in Adobe Bugbase bec
they cant replicate it.


----- Original Message ----
From: Alex Harui <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 17, 2008 1:41:53 AM
Subject: RE: [flexcoders] Titlewindow resize problem


I don’t have time to set this up
right now.  Did it clip or did you get scrollbars?  Should it clip or just
layout differently?
 

________________________________
 
From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf 
Of ibo
Sent: Wednesday, July 16, 2008
1:23 PM
To: [EMAIL PROTECTED] ups.com
Subject: [flexcoders] Titlewindow
resize problem
 
Guys need help, I've spent a day trying to figure out whats the problem
with
with this app. Its about programmatically resizing a Titlewindow. 

When I'm assigning the TitleWindow a new value for width, a portion of the
window
seems to be clipped for no reason. Is this a bug? Is there a workaround for
this?
Or am I just doing it wrong? If you will check the demo, it works as expected
bec
I have set the viewStackDialogInde x to 2 (as initial value). But if you
close the dialog box
and press the popup window again, clicking on "medium" and
"large" item wont expand the 
window anymore.

The compiled app demo:
http://www.geocitie s.com/poweribo/ TitleWindowTest. swf

The code in question:--- --------- --------- --------- --

<?xml version="1.0" encoding="utf- 8"?>
<mx:Application xmlns:mx="http: //www.adobe. com/2006/ mxml"
width="100%" height="100% ">
    <mx:Script>
       
<![CDATA[               
    
            [Bindable]
            private var
viewStackDialogInde x:int = 2;
            [Bindable]
            private var
dynamicWidth: int = 565;
            
    !         private function
displayDateDialog( event:Event) :void {
                var
item:Object = listOfThings. selectedItem;
               
viewStackDialogInde x = item.dialog;
                
                if
(item.dialog == "0") {
               
    dynamicWidth = 170;        
                }
else if (item.dialog == "1") {       
            
               
    dynamicWidth = 380;       
            
                }
else if (item.dialog == "2") {       
            
               
    dynamicWidth = 565;       
            
                }
            }
        ]]>
    </mx:Script>

    <mx:Model id="Shortcuts">
      <someItems>
        <someItem label="Small"
data="1" dialog="0"/>
        <someItem
label="Medium" data="2" dialog="1"/>
        <someItem label="Large"
data="3" dialog="2"/>
      </someItems>
    </mx:Model>
           
        
    <mx:PopUpButton id="popUpButton"
label="Please Select Item" openAlways=" true">
       
<mx:popUp>           
    
            <mx:TitleWindow
id="titleWindow" 
               
            showCloseButton= "false"
close="popUpButton. close()"  
               
           
width="{dynamicWidt h}" height="280"
               
           
verticalScrollPolic y="off" horizontalScrollPol icy="off">
            
               
<mx:HBox width="100%" height="100% "
verticalScrollPolic y="off" horizontalScrollPol icy="off">
               
               
    
               
    <mx:List id="listOfThings" 
      &n! bsp;    
            dataProvider= "{Shortcuts. someItem} " 
               
        selectedIndex= "2"
               
        width="140" height="100% "
               
        textAlign="left"  
               
        click="displayDateD ialog(event) ">   
               
        
               
    </mx:List>
  &nbs! p;        
                
               
    <mx:VBox id="thisPane" width="100%"
height="100% " verticalScrollPolic y="off"
horizontalScrollPol icy="off">
               
    
               
        <mx:ViewStack id="myViewStack"
width="100%" height="100% " 
               
            selectedIndex= "{viewStackDialo gIndex}"
verticalScrollPolic y="off" horizontalScrollPol icy="off">
               
      ! ;      
               
            <mx:HBox
label="aa" width="100%" height="100% "
               
               
      verticalScrollPolic y="off"
horizontalScrollPol icy="off">
               
               
<mx:Text text="This is Small"/>
               
           
</mx:HBox>    
               
               
               
               
        
               
            <mx:HBox
label="bb" width="100%" height="100% " 
               
               
     verticalScrollPolic y="off"
horizontalScrollPol icy="off">
               
               
<mx:Text text="This is Medium"/>   
               
     
               
            </mx:HBox>
               
            
               
            <mx:HBox
label="cc" width="100%" height="100% " 
               
               
     verticalScrollPolic y="off"
horizontalScrollPol icy="off">    
               
               
<mx:Text text="This is Large"/>
               
           
</mx:HBox>           
    
               
        </mx:ViewStack>
               
        
               
    </mx:VBox>
               
</mx:HBox>           
        
           
</mx:TitleWindow>           
    
        </mx:popUp>
    </mx:PopUpButton>    
</mx:Application>

------------ --------- --------- --------- --------- -------

Regards,
Stephen    

Reply via email to