Go Back   CodingForums.com > :: Client side development > Flash & ActionScript > Adobe Flex

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-19-2008, 03:55 PM   PM User | #1
nikos101
Senior Coder

 
nikos101's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 1,004
Thanks: 58
Thanked 10 Times in 10 Posts
nikos101 is an unknown quantity at this point
How would I centre a textarea in a canvas

How would I centre a textarea in a canvas that would adjust according to the width of the canvas set in the design view?
__________________

nikos101 is offline   Reply With Quote
Old 07-19-2008, 04:06 PM   PM User | #2
nikos101
Senior Coder

 
nikos101's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 1,004
Thanks: 58
Thanked 10 Times in 10 Posts
nikos101 is an unknown quantity at this point
Code:
<mx:Canvas label="Dynamic and interactive websites with PHP" width="100%" height="100%" >
            <mx:HBox  width="100%" height="100%" horizontalAlign="center">
                
                <mx:TextArea  height="100%" width="90%" />
            </mx:HBox>
            
        
        
        
        </mx:Canvas>
sorted
__________________

nikos101 is offline   Reply With Quote
Old 07-28-2008, 07:12 PM   PM User | #3
Ricky158
Regular Coder

 
Join Date: Aug 2002
Location: New York
Posts: 152
Thanks: 12
Thanked 0 Times in 0 Posts
Ricky158 is an unknown quantity at this point
Quote:
Originally Posted by nikos101 View Post
Code:
<mx:Canvas label="Dynamic and interactive websites with PHP" width="100%" height="100%" >
            <mx:HBox  width="100%" height="100%" horizontalAlign="center">
                
                <mx:TextArea  height="100%" width="90%" />
            </mx:HBox>
            
        
        
        
        </mx:Canvas>
sorted
Well, if you wanted to do it in the Source view, you could use the code style you provide. To do it a bit more easily in Design view, just click on the appropriate checkboxes in the Properties panel under Standard View > Layout > Constraints. The code is generated for you.
__________________
Ricky158 is offline   Reply With Quote
Old 01-24-2009, 06:48 AM   PM User | #4
xenie357
New to the CF scene

 
Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
xenie357 is an unknown quantity at this point
Hi friend, I am using photoshop CS2 and I have made painting on canvas size of 260x120. And I have some text to put on it. How do I center my text? I started with a canvas and added an oil paint background. I thought it would be so simple but I could not. I need your tips. Can you help me? Any helpful tips would be greatly appreciated. Thank you.

Last edited by xenie357; 01-24-2009 at 07:26 AM..
xenie357 is offline   Reply With Quote
Old 04-02-2009, 02:52 PM   PM User | #5
rahulb_441
New to the CF scene

 
Join Date: Apr 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
rahulb_441 is an unknown quantity at this point
if ur canvas have some parent component then there u can provide horizontalAlign="center"
like
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" pageTitle="Login"
xmlns="*" width="100%" height="100%" horizontalAlign="center" >

<mx:Canvas label="Dynamic and interactive websites with PHP" width="100%" height="100%" >
            <mx:HBox  width="100%" height="100%" horizontalAlign="center">
                
                <mx:TextArea  height="100%" width="90%" />
            </mx:HBox>    
                
        </mx:Canvas>
	
</mx:Application>


or one more thing u can do, u can provide padding (either left or right).
rahulb_441 is offline   Reply With Quote
Old 06-22-2009, 03:23 AM   PM User | #6
chowdary
New to the CF scene

 
Join Date: Jun 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
chowdary is an unknown quantity at this point
Write
HorizontalCenter=verticalCenter=0;
chowdary is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:26 PM.


Advertisement
Log in to turn off these ads.