Max Height for autoSizing of Component

Hi guys,
i've created my own treecombo which extends TriggerField with autosizing for this component. I would like to create some criteria for autosizing like when height > 300 then use hardcoded height 300 and show vertical scrollbar. Is it somehow possible ? Reason for that is the fact that if i expand many nodes in tree then combo size becames bigger than actual page size is and user is unable to see many of nodes ..

AutoSizing components usually also have a maxHeight config for this purpose (e.g. textarea).

However, if you place the treePanel inside another panel with a 'fit' layout, then you should automatically get a scrollbar once the treepanel exceeds the height of the containing panel anyway...

Thx willigogs for answer, but problem is that if i set parent panel with some fixed height or fit layout and number of nodes is low number i will see white space which i want to avoid .. therefor it will be better to have autoresizing till height < 300 and if height exceed 300 then set fixed height to see scrollbar

But problem is that i have still some border(blue ones) around data in list component pointing to:
<div id="ext-gen313" class="x-panel-body x-panel-body-noheader">
and i would like to set these borders to none but i dont know which bloody component render that ..