m_lostFocus = FALSE;
}
+bool wxRadioBox::Create( wxWindow *parent, wxWindowID id,
+ const wxString& title,
+ const wxPoint &pos, const wxSize &size,
+ const wxArrayString& choices, int majorDim,
+ long style, const wxValidator& validator,
+ const wxString &name )
+{
+ wxCArrayString chs(choices);
+
+ return Create( parent, id, title, pos, size, chs.GetCount(),
+ chs.GetStrings(), majorDim, style, validator, name );
+}
+
bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint &pos, const wxSize &size,
int n, const wxString choices[], int majorDim,
m_parent->DoAddChild( this );
PostCreation();
+ InheritAttributes();
ApplyWidgetStyle();
if (newSize.y == -1) newSize.y = ls.y;
SetSize( newSize.x, newSize.y );
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
num_of_cols = num_per_major;
num_of_rows = m_majorDim;
}
-
+
+ int lineheight = GetCharHeight()+2;
+
if ( HasFlag(wxRA_SPECIFY_COLS) ||
(HasFlag(wxRA_SPECIFY_ROWS) && (num_of_cols > 1)) )
{
for (int j = 0; j < num_of_cols; j++)
{
- y = 15;
+ y = 3;
+ y += lineheight;
int max_len = 0;
wxList::compatibility_iterator node = m_boxes.Item( j*num_of_rows );
req.height = 2;
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(button) )->size_request )
(button, &req );
-
+
if (req.width > max_len) max_len = req.width;
gtk_pizza_move( GTK_PIZZA(m_parent->m_wxwindow), button, m_x+x, m_y+y );
{
GtkWidget *button = GTK_WIDGET( node->GetData() );
- gtk_pizza_resize( GTK_PIZZA(m_parent->m_wxwindow), button, max_len, 20 );
+ gtk_pizza_resize( GTK_PIZZA(m_parent->m_wxwindow), button, max_len, lineheight );
node = node->GetNext();
if (!node) break;
{
GtkWidget *button = GTK_WIDGET( node->GetData() );
- gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), button, m_x+x, m_y+y, max, 20 );
+ gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), button, m_x+x, m_y+y, max, lineheight );
x += max;
node = node->GetNext();