1. wxRadioBox event generation fixed

2. significantly expanded and enchanced listbox sample
3. wxTextCtrl::IsModified() implemented
4. wxRadioBox button layout fixed once again
5. wxTextCtrl::SetValue() refresh bug fixed
6. wxListCtrl doesn't keep invalid selection after Delete()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-10-08 23:12:36 +00:00
parent 943240b264
commit a3a13581dd
14 changed files with 267 additions and 43 deletions

View File

@@ -181,17 +181,21 @@ void wxTextCtrl::Replace(long from, long to, const wxString& text)
// remember it for later use
wxCoord startNewText = GetTextWidth(valueNew);
// if we really replace something, refresh till the end of line as all
// remaining text in it is affected, but if we just added some text to the
// end of line, we only need to refresh the area occupied by this text
// refresh to the end of the line
wxCoord widthNewText;
valueNew += text;
if ( (size_t)to < m_value.length() )
{
valueNew += m_value.c_str() + (size_t)to;
}
// OPT: is the following really ok? not sure any more now at 2 am...
// we usually refresh till the end of line except of the most common case
// when some text is appended to the end of the string in which case we
// refresh just it
wxCoord widthNewText;
if ( (size_t)from < m_value.length() )
{
// refresh till the end of line
widthNewText = 0;
}
@@ -1711,6 +1715,9 @@ bool wxTextCtrl::PerformAction(const wxControlAction& actionOrig,
InitCommandEvent(event);
event.SetString(GetValue());
GetEventHandler()->ProcessEvent(event);
// as the text changed...
m_isModified = TRUE;
}
return TRUE;