Skip to first unread message

Alexandra M

unread,
Aug 25, 2014, 12:01:32 AM8/25/14
to mitappinv...@googlegroups.com
I want to set some components to "fill parent" once a screen's functions are underway.

Essentially I have a situation where I start with a component set to "fill parent" and then I want it to freeze at that size so I set those components to the actual pixel sizes it has when "fill to parent."

But then if there are settings changes, I want to "remeasure" what you get when filling parent. can I set component.width= <something> to make it "fill to parent" again?

Scott Ferguson

unread,
Aug 25, 2014, 1:46:46 AM8/25/14
to mitappinv...@googlegroups.com
Set Width or Height to -1 for automatic and -2 for fill parent.
---
sf

Barbara Walters

unread,
Sep 29, 2014, 5:33:54 PM9/29/14
to mitappinv...@googlegroups.com
This is fabulous information. I've looked through the component documentation for something like this and couldn't find it. Was I looking in the wrong place?

Also, I've been looking for doc regarding x and y coordinates. I found in the doc that imagesprites are positioned by the x,y coordinate of the top left corner. It seems that text drawn on a canvas is positioned by the x,y of the lower left corner. Is that correct? And if you are drawing a line, it seems that the midpoint of the line thickness is what is used for the coordinate.

Is that correct? 

SteveJG

unread,
Sep 29, 2014, 5:42:45 PM9/29/14
to mitappinv...@googlegroups.com
This may help regarding canvas coordinates:  http://www.appinventor.org/Chapter17  

text coordinates different than screen coordinates.?... try some blocks, experiment, some of this you got to figure out yourself.

Regards,
Steve
Reply all
Reply to author
Forward
0 new messages