Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: coolcoolcat on October 26, 2010, 05:12:12 pm

Title: How to resize code completion window?
Post by: coolcoolcat on October 26, 2010, 05:12:12 pm
Hi , I'm new to code::block

I download the "codeblocks-10.05mingw-setup.exe" and choose full install.

Everything works well, but when I use the code completion, the popup window is too small that I can't see complete word

Just like this picture
(http://img713.imageshack.us/img713/6164/questionv.jpg)

I can't find resize setting in settings->Editor->Code-completion and symbols browser

OS: windows 7
compiler: MinGW
code::blocks version: 10.5
debugger: gdb

Could someone help me?

best regards

Kevin
Title: Re: How to resize code completion window?
Post by: Calmarius on April 16, 2011, 04:23:09 pm
Same problem here.

I think the code completion plugin incorrectly calculates the window's size, that's why you get the ellipsis.

I think the developer does not using proportional fonts for development, because the plugin works fine if you set fixed width font for your editor.

Title: Re: How to resize code completion window?
Post by: ollydbg on April 16, 2011, 04:53:54 pm
Same problem here.

I think the code completion plugin incorrectly calculates the window's size, that's why you get the ellipsis.

I think the developer does not using proportional fonts for development, because the plugin works fine if you set fixed width font for your editor.


I review the code, and found that the window size is set inside the scintilla control.
see:
http://www.scintilla.org/ScintillaDoc.html#SCI_AUTOCSETMAXHEIGHT

So, this can be changed. :D

and there are some interface in the wxScintilla, see:
Code
// Set the maximum width, in characters, of auto-completion and user lists.
// Set to 0 to autosize to fit longest item, which is the default.
void wxScintilla::AutoCompSetMaxWidth (int characterCount)
{
    SendMsg(SCI_AUTOCSETMAXWIDTH, characterCount, 0);
}

// Get the maximum width, in characters, of auto-completion and user lists.
int wxScintilla::AutoCompGetMaxWidth() const
{
    return SendMsg(SCI_AUTOCGETMAXWIDTH, 0, 0);
}

// Set the maximum height, in rows, of auto-completion and user lists.
// The default is 5 rows.
void wxScintilla::AutoCompSetMaxHeight (int rowCount)
{
    SendMsg(SCI_AUTOCSETMAXHEIGHT, rowCount, 0);
}

// Set the maximum height, in rows, of auto-completion and user lists.
int wxScintilla::AutoCompGetMaxHeight() const
{
    return SendMsg(SCI_AUTOCGETMAXHEIGHT, 0, 0);
}

So, you can change it easily. :D