minsize and attribute tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
020707bba9
commit
8d2e831b09
@ -129,9 +129,6 @@ bool wxSpinButton::Create(wxWindow *parent,
|
||||
// basic initialization
|
||||
m_windowId = (id == -1) ? NewControlId() : id;
|
||||
|
||||
m_backgroundColour = parent->GetBackgroundColour() ;
|
||||
m_foregroundColour = parent->GetForegroundColour() ;
|
||||
|
||||
SetName(name);
|
||||
|
||||
int x = pos.x;
|
||||
@ -199,6 +196,8 @@ bool wxSpinButton::Create(wxWindow *parent,
|
||||
|
||||
SubclassWin(m_hWnd);
|
||||
|
||||
SetBestSize(size);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -370,9 +370,10 @@ bool wxSpinCtrl::Create(wxWindow *parent,
|
||||
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();
|
||||
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 )
|
||||
@ -383,8 +384,9 @@ bool wxSpinCtrl::Create(wxWindow *parent,
|
||||
sizeText.y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
|
||||
}
|
||||
|
||||
DoMoveWindow(pos.x, pos.y,
|
||||
sizeText.x + sizeBtn.x + MARGIN_BETWEEN, sizeText.y);
|
||||
//DoMoveWindow(pos.x, pos.y,
|
||||
// sizeText.x + sizeBtn.x + MARGIN_BETWEEN, sizeText.y);
|
||||
SetBestSize(size);
|
||||
|
||||
(void)::ShowWindow(GetBuddyHwnd(), SW_SHOW);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user