added virtual DoSetSize method in order to allow for MacOSX Listbox bug workaround

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2001-11-23 22:25:03 +00:00
parent afbd36dd57
commit 8614041baa
2 changed files with 44 additions and 2 deletions

View File

@@ -81,9 +81,9 @@ static pascal void wxMacListDefinition( short message, Boolean isSelected, Rect
savedClipRegion = NewRgn();
GetClip( savedClipRegion );
ClipRect( drawRect );
EraseRect( drawRect );
MoveTo(drawRect->left + 4 , drawRect->top + 10 );
::TextFont( kFontIDMonaco ) ;
@@ -265,6 +265,27 @@ void wxListBox::Free()
}
}
void wxListBox::DoSetSize(int x, int y,
int width, int height,
int sizeFlags )
{
wxControl::DoSetSize( x , y , width , height , sizeFlags ) ;
#if TARGET_CARBON
Rect bounds ;
GetControlBounds( m_macControl , &bounds ) ;
ControlRef control = GetListVerticalScrollBar( m_macList ) ;
if ( control )
{
Rect scrollbounds ;
GetControlBounds( control , &scrollbounds ) ;
if( scrollbounds.right != bounds.right + 1 )
{
UMAMoveControl( control , bounds.right - (scrollbounds.right - scrollbounds.left) + 1 ,
scrollbounds.top ) ;
}
}
#endif
}
void wxListBox::DoSetFirstItem(int N)
{
MacScrollTo( N ) ;