Implement wxLB_NO_SB style
See https://github.com/wxWidgets/wxWidgets/pull/346
This commit is contained in:
parent
2326ca72f1
commit
d24fbc7808
@ -46,7 +46,7 @@
|
||||
@style{wxLB_NEEDED_SB}
|
||||
Only create a vertical scrollbar if needed.
|
||||
@style{wxLB_NO_SB}
|
||||
Don't create vertical scrollbar (wxMSW only).
|
||||
Don't create vertical scrollbar (wxMSW and wxGTK only).
|
||||
@style{wxLB_SORT}
|
||||
The listbox contents are sorted in alphabetical order.
|
||||
@endStyleTable
|
||||
|
@ -275,16 +275,15 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
||||
|
||||
m_widget = gtk_scrolled_window_new( NULL, NULL );
|
||||
g_object_ref(m_widget);
|
||||
|
||||
GtkPolicyType vPolicy = GTK_POLICY_AUTOMATIC;
|
||||
if (style & wxLB_ALWAYS_SB)
|
||||
{
|
||||
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(m_widget),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS );
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(m_widget),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
|
||||
}
|
||||
vPolicy = GTK_POLICY_ALWAYS;
|
||||
else if (style & wxLB_NO_SB)
|
||||
vPolicy = GTK_POLICY_NEVER;
|
||||
|
||||
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(m_widget),
|
||||
GTK_POLICY_AUTOMATIC, vPolicy);
|
||||
|
||||
|
||||
GTKScrolledWindowSetBorder(m_widget, style);
|
||||
|
Loading…
Reference in New Issue
Block a user