Link to home
Start Free TrialLog in
Avatar of tamilselvanmani
tamilselvanmani

asked on

Flex TitleWindow

Hi,

I am using TiltleWindow to show the popup screen on click of itemrenderer, I want to remove the default padding for the content area in TitleWindow. i had tried all the the properties of panel as the TitleWondow extends Panel.
If anyone has the solution please provide it to me.

Thanks in Advance.
Avatar of vindys80
vindys80
Flag of India image

Hello,

Did you tried paddingBottom, paddingLeft, paddingRight, paddingTop to set to 0?

Thanks,
Vindys
Avatar of tamilselvanmani
tamilselvanmani

ASKER

Hi,

before posting the question i had tried this option this propertie is not controling the padding in TitleWindow content area.
Do you have another solution?

Thanks,
Can you take a screen shot and show which padding you mean? Also its helpful if you show the code snippet.

Thanks,
Vindys
Hello,

Try this.

borderAlpha="1" borderThicknessBottom="0" borderThicknessTop="0" borderThicknessLeft="0"
borderThicknessRight="0" paddingLeft="0" paddingRight="0" paddingBottom="0" paddingTop="0"

Hope this will work.

Thanks
Arun
hi,

i havn't tried the borderAlpha so tried it but its not working as expected. here i had attached the screen shot for reference please look in to it. In the screen shot i had had drawn 3 lines which specifies the space which i want to remove. i.e. i want to strech the Login bar to get the same size as My Popup  bar.

Thanks.



TitleWindow.bmp
Sorry Tamil,

I am not getting any clear idea. Just show some code snippet if possible. So can check it out.

Thanks,
Vindys
Hi Vindys,

Please find the code snippet which i had attached.

Thanks.
// Title window code which is rendered on click of a button.

<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" verticalGap="0" horizontalGap="0" borderAlpha="1"
		layout="vertical" paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0" borderThickness="3"
		width="410"	height="215" title="My Popup" titleStyleName="titleWindowHeader" titleBackgroundSkin="@Embed(source='images/header_bg.gif')">

<mx:Script>
			<![CDATA[
				import mx.managers.PopUpManager;
				
				private var statusText:String;
				private var contentText:String;
				
				public function setStatusText(value:String):void{
					statusText = value;
				}
				
				public function setContentText(value:String):void{
					contentText = value;
				}
				
				private function closeWindow():void{
					PopUpManager.removePopUp(this);
				}
			]]>
		</mx:Script>
<mx:Panel width="100%" height="162" borderThickness="1" layout="horizontal" title="{statusText}"
			paddingTop="0" paddingLeft="0" paddingRight="0"	paddingBottom="0" cornerRadius="0" headerHeight="24"
			dropShadowEnabled="false" borderThicknessBottom="0" borderThicknessLeft="0" borderThicknessRight="0" 
			borderThicknessTop="1" titleBackgroundSkin="@Embed(source='images/header_bg.gif')"
			titleStyleName="titleWindowStatusText" borderColor="#9DDBF4" borderSides="top" borderAlpha="1" backgroundAlpha="1">
			<mx:Form width="100%" height="133" horizontalGap="0" verticalGap="0" verticalCenter="true"
				 indicatorGap="0" paddingBottom="0" paddingTop="0">
				<mx:VBox width="100%" height="130" verticalGap="0">
					<mx:Text text="Are you sure you want to {contentText}?" height="42" styleName="titleWindowLabel"/>
					<mx:Text text="{statusText} Comments" fontWeight="bold" styleName="titleWindowLabel" height="24"/>
					<mx:TextArea width="100%" height="31"/>
					<mx:HBox width="100%" horizontalAlign="right" height="30" verticalAlign="middle">
						
						<mx:Button label="Cancel" click=" closeWindow()" enabled="true" styleName="titleWindowButton"/>
						<mx:Spacer height="100%" width="3"/>
						<mx:Button label="{statusText}" enabled="true" styleName="titleWindowButton" verticalCenter="true"/>
					</mx:HBox>
				</mx:VBox>
			</mx:Form>
		</mx:Panel>

</mx:TitleWindow>


// Code to invoke the Title window

<mx:Script>
	<![CDATA[
 import mx.managers.PopUpManager;
 var signOffvar:signOff;
            public function createPopUp():void{
            	signOffvar = new signOff();
            	signOffvar.setStatusText("Log in");
            	signOffvar.setContentText("Log out");
				PopUpManager.addPopUp(signOffvar,this,true);
				PopUpManager.centerPopUp(signOffvar);
  			} 
        ]]>


</mx:Script>

<mx:Image id="report" source="{reporting_icon}" click="createPopUp()" useHandCursor="true" buttonMode="true"/>

Open in new window

Its caused because of your titleBackgroundSkin.
Hi,

It's not because of titleBackgroundSkin. I had tried this sort of probabilities.
Can you just use this code instead of your signOff and check if its giving any space
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" verticalGap="0" horizontalGap="0" borderAlpha="1"
                layout="vertical" paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0" borderThickness="3"
                width="410"     height="215" title="My Popup">

<mx:Script>
                        <![CDATA[
                                import mx.managers.PopUpManager;
                                
                                private var statusText:String;
                                private var contentText:String;
                                
                                public function setStatusText(value:String):void{
                                        statusText = value;
                                }
                                
                                public function setContentText(value:String):void{
                                        contentText = value;
                                }
                                
                                private function closeWindow():void{
                                        PopUpManager.removePopUp(this);
                                }
                        ]]>
                </mx:Script>
                
<mx:Panel width="100%" height="162" borderThickness="1" layout="horizontal" title="{statusText}"
                        paddingTop="0" paddingLeft="0" paddingRight="0" paddingBottom="0" cornerRadius="0" headerHeight="24"
                        dropShadowEnabled="false" borderThicknessBottom="0" borderThicknessLeft="0" borderThicknessRight="0" 
                        borderThicknessTop="1"
                        titleStyleName="titleWindowStatusText" borderColor="#9DDBF4" borderSides="top" borderAlpha="1" backgroundAlpha="1">
                        <mx:Form width="100%" height="133" horizontalGap="0" verticalGap="0" verticalCenter="true"
                                 indicatorGap="0" paddingBottom="0" paddingTop="0">
                                <mx:VBox width="100%" height="130" verticalGap="0">
                                        <mx:Text text="Are you sure you want to {contentText}?" height="42" styleName="titleWindowLabel"/>
                                        <mx:Text text="{statusText} Comments" fontWeight="bold" styleName="titleWindowLabel" height="24"/>
                                        <mx:TextArea width="100%" height="31"/>
                                        <mx:HBox width="100%" horizontalAlign="right" height="30" verticalAlign="middle">
                                                
                                                <mx:Button label="Cancel" click=" closeWindow()" enabled="true" styleName="titleWindowButton"/>
                                                <mx:Spacer height="100%" width="3"/>
                                                <mx:Button label="{statusText}" enabled="true" styleName="titleWindowButton" verticalCenter="true"/>
                                        </mx:HBox>
                                </mx:VBox>
                        </mx:Form>
                </mx:Panel>

</mx:TitleWindow>

Open in new window

Hi,

I had resolved my problem with the help of css. i have one problem i.e. i want to pass an object which is fetched from DB to the mxml which invokes the title window mxml. Do any one have any answere. Let me clear one thing i had tried many samples which i found while googling.

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of vindys80
vindys80
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i have resolved this issue