At a window resize I "anchor" a button or an edit field at a window
edge I use the following subroutine (FN) :
-----------------------------------------------
LOCAL
dim as HILayoutInfo layoutInfo
dim as ControlRef buttonRef
LOCAL FN ButtonReposition( nrButton as SHORT, left as Boolean, top as
Boolean, right as Boolean, bottom as Boolean )
layoutInfo.version = _kHILayoutInfoVersionZero
buttonRef = button&( nrButton )
fn HIViewGetLayoutInfo( buttonRef, @layoutInfo )
if ( top ) then layoutInfo.binding.top.kind = _kHILayoutBindTop
if ( left ) then layoutInfo.binding.left.kind = _kHILayoutBindLeft
if ( bottom ) then layoutInfo.binding.bottom.kind =
_kHILayoutBindBottom
if ( right ) then layoutInfo.binding.right.kind = _kHILayoutBindRight
fn HIViewSetLayoutInfo( buttonRef, @layoutInfo )
END FN
-----------------------------------------------
e.g.:
appearance button 1,0,0,,,"",(10, window(_height)-88)-(227,
window(_height)-20), _kControlPushButtonProc
FN ButtonReposition( 1, _zTrue, _false, _false, _zTrue )
-----------------------------------------------
How can I do this for a List View ?
(Let's say : _false, _false, _zTrue, _zTrue)
Thanks,
Eugen R.