how to rotate a textbox

508 views
Skip to first unread message

moun

unread,
May 1, 2017, 9:43:58 AM5/1/17
to MIT App Inventor Forum
is there a way to rotate a textbox 90 or 180 degrees for exemple

Italo

unread,
May 1, 2017, 9:45:53 AM5/1/17
to mitappinv...@googlegroups.com
No. But you can probably come up with a solution by using a canvas and the DrawTextAtAngle block, by setting the angle parameter to what you want.


moun

unread,
May 1, 2017, 9:56:08 AM5/1/17
to MIT App Inventor Forum
I'll try it. thank you so much Italo

moun

unread,
May 1, 2017, 11:09:47 AM5/1/17
to MIT App Inventor Forum
what i want to do is a screen like this with two textboxes or two lables in order to be used by two players in the same time
how can i do that?
2P.jpg

Taifun

unread,
May 1, 2017, 11:38:07 AM5/1/17
to MIT App Inventor Forum
as Italo already said, use the canvas...

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  
How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the
 Top 5 Tips: How to learn  App Inventor

You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do.

Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by  Taifun.         



moun

unread,
May 1, 2017, 7:55:46 PM5/1/17
to mitappinv...@googlegroups.com
thanks Mr Taifun. i really try to learn App Inventor by reading the free Inventor's Manual. but some times i need an example to understand well . i learnt a lot of things by analysing these examples that is why i steel hope to find an exemple of rotating a textbox.
I want to make two text boxes like this in order to be seen by each player. the Screen Orientation is landscape. Idont want textboxes to be rotated by clicking on a  button or touching a canva 

PP2.png

Taifun

unread,
May 1, 2017, 8:35:28 PM5/1/17
to MIT App Inventor Forum
as Italo already said, you can't rotate a textbox
but you can use a canvas and the DrawTextAtAngle method to draw some text onto the canvas, for example draw the text for player 1 by 90 degrees and the text for player 2 by 270 degrees...
this however will not replace a textbox...


DrawTextAtAngle(text text, number x, number y, number angle)
Draws the specified text starting at the specified coordinates at the specified angle using the values of the FontSize and TextAlignment properties.

hope that helps
Taifun

Abraham Getzler

unread,
May 2, 2017, 12:23:37 PM5/2/17
to MIT App Inventor Forum
This is a stupid trick to try, and I have not tried it ...

Make a separate screen arrangement with everything else rotated compared to the text box,
and switch the screen from Portrait to Landscape or vice versa.

This is a last resort, in my opinion.

ABG

Abraham Getzler

unread,
May 2, 2017, 3:50:45 PM5/2/17
to MIT App Inventor Forum
Here's another idea ...

Is the text box output only?
If so, there are ways to ask for rotated text in HTML.

The Label and Web Viewer components can show limited html.

ABG

moun

unread,
May 2, 2017, 8:50:55 PM5/2/17
to MIT App Inventor Forum
thank you very very much Mr Taifun / Mr Abraham Getzler / Mr Italo
i'm trying the way of Mr Taifun, and i'll tell you the result,
Reply all
Reply to author
Forward
0 new messages