style |= wxSP_VERTICAL;
if ( (style & wxBORDER_MASK) == wxBORDER_DEFAULT )
+#ifdef __WXWINCE__
+ style |= wxBORDER_SIMPLE;
+#else
style |= wxBORDER_SUNKEN;
+#endif
SetWindowStyle(style);
m_wndProcBuddy = (WXFARPROC)wxSetWindowProc(GetBuddyHwnd(),
wxBuddyTextWndProc);
- // should have the same font as the other controls
- SetFont(GetParent()->GetFont());
+ // set up fonts and colours (This is nomally done in MSWCreateControl)
+ InheritAttributes();
+ if (!m_hasFont)
+ SetFont(GetDefaultAttributes().font);
// set the size of the text window - can do it only now, because we
// couldn't call DoGetBestSize() before as font wasn't set
if ( sizeText.y <= 0 )
{
int cx, cy;
- wxGetCharSize(GetHWND(), &cx, &cy, &GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, GetFont());
sizeText.y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
}
- DoMoveWindow(pos.x, pos.y,
- sizeText.x + sizeBtn.x + MARGIN_BETWEEN, sizeText.y);
+ SetBestSize(size);
(void)::ShowWindow(GetBuddyHwnd(), SW_SHOW);
void wxSpinCtrl::SetSelection(long from, long to)
{
- // if from and to are both -1, it means (in wxWindows) that all text should
+ // if from and to are both -1, it means (in wxWidgets) that all text should
// be selected - translate into Windows convention
if ( (from == -1) && (to == -1) )
{
sizeBtn.x += DEFAULT_ITEM_WIDTH + MARGIN_BETWEEN;
int y;
- wxGetCharSize(GetHWND(), NULL, &y, &GetFont());
+ wxGetCharSize(GetHWND(), NULL, &y, GetFont());
y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(y);
// JACS: we should always use the height calculated