wxStyledTextCtrl的代码补全被截断

这是wxWidgets论坛的中文版本。在这里,您可以用您的母语汉语讨论上面任一子论坛所涉及的所有关于wxWidgets的话题。欢迎大家参与到对有价值的帖子的中英互译工作中来!
JacquesChen
In need of some credit
In need of some credit
Posts: 7
Joined: Tue Jan 03, 2017 9:33 am

wxStyledTextCtrl的代码补全被截断

Postby JacquesChen » Tue Jan 10, 2017 2:46 pm

我尝试用wxStyledTextCtrl里面的AutoComp做代码补全,我的代码如下:

Code: Select all

    int Pos = CodeEdit->GetCurrentPos();
    int Start = CodeEdit->WordStartPosition( Pos, true );
    if( Pos - Start > 2 && !CodeEdit->AutoCompActive() && IfAutoComp == true ) // require 3 characters to show auto-complete
    {
        wxString TrieStr = CodeEdit->GetTextRange( Start, Pos );
        Trie *CompWord = KeyWordTire->Query( TrieStr.mb_str(), KeyWordTire );
        if( CompWord != NULL )
        {
            wxString KeyList = KeyWordTire->GetKeyList( CompWord, TrieStr );
            CodeEdit->AutoCompShow( Pos - Start, KeyList );
        }
    }


但是不全列表总是被截断掉,我觉得是滚动条的宽度占用了几个字符的空间,请问有没有办法取消滚动条呢?AutoCompSetMaxWidth也完全起不到作用。截图如下:
11.png
11.png (10.51 KiB) Viewed 666 times

Return to “wxWidgets Development (Chinese)”

Who is online

Users browsing this forum: Baidu [Spider] and 3 guests