...

View Full Version : How would I centre a textarea in a canvas



nikos101
07-19-2008, 04:55 PM
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
07-19-2008, 05:06 PM
<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

Ricky158
07-28-2008, 08:12 PM
<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.

xenie357
01-24-2009, 07:48 AM
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.

rahulb_441
04-02-2009, 03:52 PM
if ur canvas have some parent component then there u can provide horizontalAlign="center"
like


<?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).

chowdary
06-22-2009, 04:23 AM
Write
HorizontalCenter=verticalCenter=0;



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum