// Name: scrolbar.cpp
// Purpose:
// Author: Robert Roebling
-// Created: 01/02/97
-// Id:
-// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
+// Id: $Id$
+// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
int value = (int)(win->m_adjust->value+0.5);
int orient = wxHORIZONTAL;
- if (win->GetWindowStyleFlag() & wxSB_VERTICAL == wxSB_VERTICAL) orient = wxHORIZONTAL;
+ if (win->GetWindowStyleFlag() & wxSB_VERTICAL == wxSB_VERTICAL) orient = wxVERTICAL;
wxScrollEvent event( command, win->GetId(), value, orient );
event.SetEventObject( win );
gtk_signal_connect( GTK_OBJECT(m_widget), "button_release_event",
(GtkSignalFunc)gtk_scrollbar_button_release_callback, (gpointer) this );
+ m_parent->AddChild( this );
+
+ (m_parent->m_insertCallback)( m_parent, this );
+
PostCreation();
+ SetBackgroundColour( parent->GetBackgroundColour() );
+
Show( TRUE );
return TRUE;
SetPosition( position );
return;
}
-
+
m_oldPos = fpos;
m_adjust->lower = 0.0;
m_adjust->upper = frange;
m_adjust->value = fpos;
m_adjust->step_increment = 1.0;
- m_adjust->page_increment = (float)(wxMax(fpage-2,0));
+ m_adjust->page_increment = (float)(wxMax(fpage,0));
m_adjust->page_size = fthumb;
gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" );
(window == range->step_forw) ||
(window == range->step_back) );
}
+
+void wxScrollBar::ApplyWidgetStyle()
+{
+ SetWidgetStyle();
+ gtk_widget_set_style( m_widget, m_widgetStyle );
+}
+