Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Close code completion on "space"?
mandrav:
--- Code: (cpp) ---case WXK_SPACE:
int pos = m_pEditor->GetCurrentPos();
m_pEditor->InsertText(pos, _T(' ')); // I don't remember this by heart, sorry (look it up)
m_pEditor->GotoPos(pos + 1);
Destroy();
break;
--- End code ---
tiwag:
--- Quote from: mandrav on March 16, 2006, 09:15:23 am ---I don't remember this by heart, sorry (look it up)
--- End quote ---
this works fine
--- Code: (cpp) --- case WXK_SPACE:
{
m_pList->AddChar(c);
Destroy();
break;
}
--- End code ---
thanks for the tip !
tiwag:
btw:
this
--- Quote from: source code --- // unfortunately, for some odd reason, we never get wxGrid's (m_pList)
// OnChar event.
// So we have to process all key handling here (with raw keycodes...)
--- End quote ---
is very ugly and really a shame (of wxWidgets ?) !
tiwag:
btw2:
CCList::PositionMe()
doesn't work on dual monitor desktop :(
has anybody any tips how to solve this ?
mandrav:
--- Quote from: tiwag on March 16, 2006, 10:24:46 am ---btw:
this
--- Quote from: source code --- // unfortunately, for some odd reason, we never get wxGrid's (m_pList)
// OnChar event.
// So we have to process all key handling here (with raw keycodes...)
--- End quote ---
is very ugly and really a shame (of wxWidgets ?) !
--- End quote ---
This part of the code was created very early in the project history. I believe it was with wx2.4?
Anyway, this might have been fixed by now but I don't see the point of adding functionality in this custom control anymore. As you saw, it also has positioning problems with multi-monitor setups. Also, in KDE, it looses focus or something (we had a bug report about it).
For these reasons, the scintilla's embedded auto-complete box has been enabled and favoured over our custom implementation. The only reason I left this custom control in there, is for reference purposes on how to use/create a custom renderer for wxGrid (!).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version