- int currentX, currentY;
- GetPosition(¤tX, ¤tY);
- int xx = x;
- int yy = y;
-
- if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
- xx = currentX;
- if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
- yy = currentY;
-
- wxChar buf[400];
-
- int y_offset = yy;
- int x_offset = xx;
- int current_width, cyf;
-
- int cx1,cy1;
- wxGetCharSize(m_hWnd, &cx1, &cy1, & GetFont());
- // Attempt to have a look coherent with other platforms:
- // We compute the biggest toggle dim, then we align all
- // items according this value.
- int maxWidth = -1;
- int maxHeight = -1;
-
- int i;
- for (i = 0 ; i < m_noItems; i++)
- {
- int eachWidth;
- int eachHeight;
- if (m_radioWidth[i]<0)
- {
- // It's a labelled toggle
- GetWindowText((HWND) m_radioButtons[i], buf, 300);
- GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL, & GetFont());
- eachWidth = (int)(current_width + RADIO_SIZE);
- eachHeight = (int)((3*cyf)/2);
- }
- else
+ int currentX, currentY;
+ GetPosition(¤tX, ¤tY);
+ int widthOld, heightOld;
+ GetSize(&widthOld, &heightOld);
+
+ int xx = x;
+ int yy = y;
+
+ if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
+ xx = currentX;
+ if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
+ yy = currentY;
+
+ wxString buf;
+
+ int y_offset = yy;
+ int x_offset = xx;
+ int current_width, cyf;
+
+ int cx1,cy1;
+ wxGetCharSize(m_hWnd, &cx1, &cy1, & GetFont());
+
+ // Attempt to have a look coherent with other platforms: We compute the
+ // biggest toggle dim, then we align all items according this value.
+ int maxWidth = -1;
+ int maxHeight = -1;
+
+ int i;
+ for (i = 0 ; i < m_noItems; i++)