The margins I want to have are the following:
0 - Line Nmber
1 - Text (5 characters)
2 - Bookmark
3 - Folding

The code I use to set this up is the following
enum EMargin
{
    eLineNumber = 0,
    eDataMark = 1,
    eBookMarks = 2,
    eFoldingMargin=3
};

    setMarginType( eLineNumber, QsciScintilla::NumberMargin );
    setMarginType( eDataMark, QsciScintilla::TextMargin );
    setMarginWidth( eDataMark, "CIWEF" );  // will be set to one or more of 
these characters
    setMarginType( eFoldingMargin, QsciScintilla::SymbolMargin );
    setMarginType( eBookMarks, QsciScintilla::SymbolMargin );
    setMarginWidth( eBookMarks, 16 );
    QPixmap bookmark( ":/resources/bookmark.png" );
    bookmark = bookmark.scaled( 12, 12, Qt::KeepAspectRatio );
    markerDefine( bookmark, eBookMarks );


For the bookmarks
markerAdd( lineNum, eBookmarks) is called when the correct action is triggered.

For the text margin I use
setMarginText( lineNum, text, STYLE_LINENUMBER )


The problem I have, is the location of where the bookmark is painted is wrong
[cid:[email protected]]

Its painting it in the middle of the 1 margin and not painting it in the 2 
margin.

Any ideas?


_______________________________________________
QScintilla mailing list
[email protected]
https://www.riverbankcomputing.com/mailman/listinfo/qscintilla

Reply via email to