- // It's a labeled item
- GetWindowText((HWND) m_radioButtons[i], buf, 300);
- GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL, & this->GetFont());
-
- // How do we find out radio button bitmap size!!
- // By adjusting them carefully, manually :-)
- eachWidth = (int)(current_width + RADIO_SIZE);
- eachHeight = (int)((3*cyf)/2);
+ // Bidimensional radio adjustment
+ if (i&&((i%m_majorDim)==0)) // Why is this omitted for i = 0?
+ {
+ if (m_windowStyle & wxRA_VERTICAL)
+ {
+ y_offset = startY;
+ x_offset += maxWidth + cx1 ;
+ }
+ else
+ {
+ x_offset = startX ;
+ y_offset += maxHeight ;
+ if (m_radioWidth[0]>0)
+ y_offset += cy1/2 ;
+ }
+ }
+ int eachWidth ;
+ int eachHeight ;
+ if (m_radioWidth[i]<0)
+ {
+ // It's a labeled item
+ textRadioButton = wxGetWindowText(m_radioButtons[i]);
+ GetTextExtent(textRadioButton, ¤t_width, &cyf,
+ NULL,NULL, & this->GetFont());
+
+ // How do we find out radio button bitmap size!!
+ // By adjusting them carefully, manually :-)
+ eachWidth = (int)(current_width + RADIO_SIZE);
+ eachHeight = (int)((3*cyf)/2);
+ }
+ else
+ {
+ eachWidth = m_radioWidth[i] ;
+ eachHeight = m_radioHeight[i] ;
+ }
+
+ MoveWindow((HWND) m_radioButtons[i],x_offset,y_offset,eachWidth,eachHeight,TRUE);
+ if (m_windowStyle & wxRA_VERTICAL)
+ {
+ y_offset += maxHeight;
+ if (m_radioWidth[0]>0)
+ y_offset += cy1/2 ;
+ }
+ else
+ x_offset += maxWidth + cx1;