Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Senior Coder nikos101's Avatar
    Join Date
    Dec 2006
    Location
    London
    Posts
    1,007
    Thanks
    59
    Thanked 10 Times in 10 Posts

    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?


  • #2
    Senior Coder nikos101's Avatar
    Join Date
    Dec 2006
    Location
    London
    Posts
    1,007
    Thanks
    59
    Thanked 10 Times in 10 Posts
    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


  • #3
    Regular Coder
    Join Date
    Aug 2002
    Location
    New York
    Posts
    152
    Thanks
    12
    Thanked 0 Times in 0 Posts
    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.

  • #4
    New to the CF scene
    Join Date
    Jan 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #5
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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).

  • #6
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Write
    HorizontalCenter=verticalCenter=0;


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •