Gtk2: avoid presence of horizontal scrollbar when TListBox is cleared by using gtk_tree_view_columns_autosize().Fixes issue #17837

git-svn-id: trunk@28097 -
This commit is contained in:
zeljko 2010-11-05 15:37:14 +00:00
parent d492ceb716
commit 1364a5441f

View File

@ -735,6 +735,11 @@ begin
gtk_list_store_clear(FGtkListStore);
//resize columns to optimal width. See issue #17837
//TODO: see if this is needed by TComboBox and others.
if FOwner is TListBox then
gtk_tree_view_columns_autosize(PGtkTreeView(WidgetInfo^.CoreWidget));
Dec(WidgetInfo^.ChangeLock);
//Update the internal Index cache
PInteger(WidgetInfo^.UserData)^ := -1;