several fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -60,8 +60,15 @@ wxLayoutWindow::OnMouse(wxMouseEvent& event)
|
||||
void
|
||||
wxLayoutWindow::OnChar(wxKeyEvent& event)
|
||||
{
|
||||
if(! m_llist.IsEditable()) // do nothing
|
||||
{
|
||||
event.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
long keyCode = event.KeyCode();
|
||||
|
||||
wxPoint p;
|
||||
|
||||
switch(event.KeyCode())
|
||||
{
|
||||
case WXK_RIGHT:
|
||||
@@ -82,6 +89,16 @@ wxLayoutWindow::OnChar(wxKeyEvent& event)
|
||||
case WXK_NEXT:
|
||||
m_llist.MoveCursor(0,20);
|
||||
break;
|
||||
case WXK_HOME:
|
||||
p = m_llist.GetCursor();
|
||||
p.x = 0;
|
||||
m_llist.SetCursor(p);
|
||||
break;
|
||||
case WXK_END:
|
||||
p = m_llist.GetCursor();
|
||||
p.x = m_llist.GetLineLength(m_llist.FindCurrentObject(NULL));
|
||||
m_llist.SetCursor(p);
|
||||
break;
|
||||
case WXK_DELETE :
|
||||
m_llist.Delete(1);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user