Adjusting the height of a widget.newTableView and getting its parameters

I have 2 bugs regarding this.

1.) Is it possible to change the height of the TableView() without it stretching the cells contained inside it?
Example:
I have a simple TableView with an image and some text. I want a part of the screen to slide up out of view and the TableView below it to slide up to where the other part was. That portion is fine but now I need to change the height of the TableView to compensate for the part we slid up and removed. When I try to set the height using:

myTableview.height=myTableview.height+107

The TableView height gets adjusted correctly but the cells inside it get stretched vertically making the text and image inside look bad. Is there a way to fix this? Maybe tell the TableView to redraw it’s cells?

2.)Look at the below code snippet, list.height is ALWAYS the same even though its getting adjusted in the code.

local function adjustheight()  
 print("Current Height of TableView: "..list.height)  
 if azListing == true then  
 list.height = list.height + 160  
 else  
 list.height = list.height - 160  
 end  
end  

This should increase the height by 160 if azListing is true and decrease it if its false. What happens is list.height gets adjusted to whatever it wants to after the first toggle/call of adjustHeight. Something is not right here. [import]uid: 58885 topic_id: 23319 reply_id: 323319[/import]

Anyone? Is this a bug? [import]uid: 58885 topic_id: 23319 reply_id: 94250[/import]

I think your best bet here might be to remove the list and recreate it at the height you want.

If you want to change the height of the widget content, you don’t want to change the height of the group, otherwise that will affect all its child elements (the rows) as you’ve experienced.

The parameter you’re probably looking for is widgetHeight, but this is read-only.

The thing is though that to stop rows from displaying outside the area you’re also going to need to change the list’s mask as well. So I think you’re going to need to scale the mask image’s height, and find some way to change the list’s height (only way I know of is by destroying and remaking the widget object). [import]uid: 87138 topic_id: 23319 reply_id: 94387[/import]