[Source]Combo Box Fix

05/11/2013 11:44 Rhyder`#1
Im going to Share The combobox fix of Caja :)

If you want extended /ci(createitem): [Only registered and activated users can see links. Click Here To Register...]

WndControl.cpp
Search for:
Code:
int CWndComboBox::AddString( LPCTSTR lpszString )
{
    int nNum = m_wndListBox.AddString( lpszString );
    CRect rect = m_wndListBox.GetWindowRect( TRUE );
    rect.bottom = rect.top + ( ( nNum + 1 ) * ( m_pFont->GetMaxHeight() + 3 ) ) + 8;
    m_wndListBox.SetWndRect( rect );
    return nNum;
}
Replace by:
Code:
int CWndComboBox::AddString( LPCTSTR lpszString )
{
    int nNum = m_wndListBox.AddString( lpszString );
    CRect rect = m_wndListBox.GetWindowRect( TRUE );
 
    if(nNum > 10)
        nNum = 10;
    DEBUG_ONLY(IRALog::GetInstance()->Debug("CWndComboBox::AddString : nNum[%d]", nNum));
    rect.bottom = rect.top + ( ( nNum + 1 ) * ( m_pFont->GetMaxHeight() + 3 ) ) + 8;
    m_wndListBox.SetWndRect( rect );
    return nNum;
}
.
.
To edit Height of combo box:
Code:
nNum > 10

nNum = 10
Replace 10 what ever you wan't its either 15 or 20
Picture:
[Only registered and activated users can see links. Click Here To Register...]


Credits: 99.99% Caja
00.01% Me :p
05/11/2013 23:37 Supr3matt#2
Already had, but will serve other people, thanks for sharing
05/12/2013 09:34 Shiaru#3
or just use this, is also included here & better:

[Only registered and activated users can see links. Click Here To Register...]
05/12/2013 10:58 Rhyder`#4
Quote:
Originally Posted by Shiaru View Post
or just use this, is also included here & better:

[Only registered and activated users can see links. Click Here To Register...]
yeah that is extended admin create item while mine is for the combo box only.
but thanks for your :)
05/12/2013 20:43 adeilson123#5
Quote:
Originally Posted by jayjei14 View Post
Im going to Share The combobox fix of Caja :)

WndControl.cpp
Search for:
Code:
int CWndComboBox::AddString( LPCTSTR lpszString )
{
    int nNum = m_wndListBox.AddString( lpszString );
    CRect rect = m_wndListBox.GetWindowRect( TRUE );
    rect.bottom = rect.top + ( ( nNum + 1 ) * ( m_pFont->GetMaxHeight() + 3 ) ) + 8;
    m_wndListBox.SetWndRect( rect );
    return nNum;
}
Replace by:
Code:
int CWndComboBox::AddString( LPCTSTR lpszString )
{
    int nNum = m_wndListBox.AddString( lpszString );
    CRect rect = m_wndListBox.GetWindowRect( TRUE );
 
    if(nNum > 10)
        nNum = 10;
    DEBUG_ONLY(IRALog::GetInstance()->Debug("CWndComboBox::AddString : nNum[%d]", nNum));
    rect.bottom = rect.top + ( ( nNum + 1 ) * ( m_pFont->GetMaxHeight() + 3 ) ) + 8;
    m_wndListBox.SetWndRect( rect );
    return nNum;
}
Picture:
[Only registered and activated users can see links. Click Here To Register...]


Credits: 99.99% Caja
00.01% Me :p
I pitched well before...
My source already has this.
you guys got from my source UPDATE 3 ...
05/13/2013 01:50 Rhyder`#6
Quote:
Originally Posted by adeilson123 View Post
I pitched well before...
My source already has this.
you guys got from my source UPDATE 3 ...
o.O caja already have this at french forum of jtb1 when your source are not finish yet!
05/14/2013 11:23 arnootie#7
dont work.. its messes around with the typ's?...

look:

[Only registered and activated users can see links. Click Here To Register...]

its on type stromblade, and i got shields, etc etc.. and as you can see i got the update of you're scrol bar..
05/15/2013 22:53 sbobetcom#8
:D
Code:
int CWndComboBox::AddString( LPCTSTR lpszString )
{
	int nNum = m_wndListBox.AddString( lpszString );
	CRect rect = m_wndListBox.GetWindowRect( TRUE );
	int nNum2 = nNum;
	if (nNum2 > 20)
	{
	    nNum2 = 20;
	}
	rect.bottom = rect.top + ( ( nNum2 + 1 ) * ( m_pFont->GetMaxHeight() + 3 ) ) + 8;
	m_wndListBox.SetWndRect( rect );
	return nNum;
}
Credits: 100% V15Source China
05/16/2013 04:09 Rhyder`#9
Quote:
Originally Posted by sbobetcom View Post
:D
Code:
int CWndComboBox::AddString( LPCTSTR lpszString )
{
	int nNum = m_wndListBox.AddString( lpszString );
	CRect rect = m_wndListBox.GetWindowRect( TRUE );
	int nNum2 = nNum;
	if (nNum2 > 20)
	{
	    nNum2 = 20;
	}
	rect.bottom = rect.top + ( ( nNum2 + 1 ) * ( m_pFont->GetMaxHeight() + 3 ) ) + 8;
	m_wndListBox.SetWndRect( rect );
	return nNum;
}
Credits: 100% V15Source China
O.o try to look on ltd source :P
05/16/2013 04:58 sbobetcom#10
[Only registered and activated users can see links. Click Here To Register...] :D
06/04/2013 13:55 Rhyder`#11
Quote:
Originally Posted by sbobetcom View Post
[Only registered and activated users can see links. Click Here To Register...] :D
your nNum2 > 20

my nNum > 10 Thats why it's short :)
06/04/2013 19:35 Jomex#12
Actually you are tards....

It will cause all data after nNum fuck up.

TIP: Check Admin Create Item functioning with nNum set to 10.
06/09/2013 12:02 DardanDev#13
Quote:
Originally Posted by Jomex View Post
Actually you are tards....

It will cause all data after nNum fuck up.

TIP: Check Admin Create Item functioning with nNum set to 10.
Yep!

Just modify this line:
Quote:
rect.bottom = rect.top + ( ( nNum + 1 ) * ( m_pFont->GetMaxHeight() + 3 ) ) + 8;
and change it to this:

Quote:
rect.bottom = rect.top + ( ( (nNum <= 15 ? nNum : 15) + 1 ) * ( m_pFont->GetMaxHeight() + 3 ) ) + 8;
Change 15 to whatever you want, it changes the size of the combobox.

Regards, Me;