Hi All,
I'm using wxStyledTextCtrl as an interface to Scintilla. I've made some
small changes to Editor.cxx that were beneficial to the app that I'm
developing, and I thought I'd post them here. Basically, I was having
trouble with "hotspots". I have hotspots on a page that load new
information into the same page when clicked. However, when these
hotspots were clicked, the new text always had some amount of selected
text because of mouse-up action was occuring after the page changed. To
resolve this problem, I did this:
In void Editor::ButtonDown(...) I removed this...
if (PointIsHotspot(pt)) {
//NotifyHotSpotClicked(newPos, shift, ctrl, alt);
}
...because in most applications, hyperlinks are activated on mouseUp,
not mouseDown.
And in void Editor::ButtonUp(...), I changed this...
if (selectionType == selChar) {
SetSelection(newPos);
}
...to this...
if (PointIsHotspot(pt)) {
NotifyHotSpotClicked(newPos, false, ctrl, false);
}
else if (selectionType == selChar) {
SetSelection(newPos);
}
...I don't think that interferes with much, and it solved my problem.
Anyway, thanks for Scintilla. It's very handy.
Tom
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest