Problem in listbox (to Antonio)
Problem in listbox (to Antonio)
Antonio,
Since I use FWH 9.12, I noticed a problem in the listbox.
In the scrollbar, the block which can be used to scroll, has vanished. Also, the arrows on the scrollbar can't be used. The only way to scroll, is using the arrow keys on my keyboard.
If I use FWH 9.11 again, the block in the scrollbar is back and everything is running fine.
What is the cause of this behaviour ?
Thanks a lot in advance.
Since I use FWH 9.12, I noticed a problem in the listbox.
In the scrollbar, the block which can be used to scroll, has vanished. Also, the arrows on the scrollbar can't be used. The only way to scroll, is using the arrow keys on my keyboard.
If I use FWH 9.11 again, the block in the scrollbar is back and everything is running fine.
What is the cause of this behaviour ?
Thanks a lot in advance.
Last edited by driessen on Sun Jan 31, 2010 9:12 pm, edited 1 time in total.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Problem in listbox
Michel,
Please comment this line in FWH\source\classes\scrllbar.prg:
Please comment this line in FWH\source\classes\scrllbar.prg:
Code: Select all
METHOD SetPage( nSize, lReDraw ) CLASS TScrollBar
local nFlags
DEFAULT lRedraw := .f.
// nSize = Max( 10, nSize )
if ! Empty( ::hWnd )
...
Re: Problem in listbox
Antonio,
I'm sorry but your suggestion is not helping.
I still use FWH 9.12 but I added SCRLLBAR.PRG from FWH 9.11.
Everything is working fine now.
Thanks for your help.
I'm sorry but your suggestion is not helping.
I still use FWH 9.12 but I added SCRLLBAR.PRG from FWH 9.11.
Everything is working fine now.
Thanks for your help.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Problem in listbox
Michel,
These are the only changes from FWH 9.11 to 9.12 in Class TScrollBar:
Commenting the line that I told you it should solve it.
These are the only changes from FWH 9.11 to 9.12 in Class TScrollBar:
Commenting the line that I told you it should solve it.
Re: Problem in listbox
Antonio,
I'm leaving on holidays for the week to come.
I'll try it out when I'm back. If necessary I put a message here.
Thanks a lot for your efforts.
I'm leaving on holidays for the week to come.
I'll try it out when I'm back. If necessary I put a message here.
Thanks a lot for your efforts.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Re: Problem in listbox
Antonio,
I took a closer look at the problem in the scrollbar of the listbox.
Even in FWH 10.1 I noticed that the problem is in SCRLLBAR.PRG. The cause has to be found in this code :No block is visible in the scrollbar.
If I change it this way (/* and */) :everything is working fine. The block is visible and useable in the scrollbar.
Any idea ?
Thanks a lot in advance.
I took a closer look at the problem in the scrollbar of the listbox.
Even in FWH 10.1 I noticed that the problem is in SCRLLBAR.PRG. The cause has to be found in this code :
Code: Select all
METHOD SetPage( nSize, lReDraw ) CLASS TScrollBar
local nFlags
DEFAULT lRedraw := .f.
// nSize = Max( 10, nSize )
if ! Empty( ::hWnd )
nFlags = SB_CTL
else
if ::lVertical
nFlags = SB_VERT
else
nFlags = SB_HORZ
endif
endif
::nPgStep = nSize
SetScrollInfo( If( ! Empty( ::hWnd ), ::hWnd, ::oWnd:hWnd ),;
nFlags, nSize, lReDraw )
return nil
If I change it this way (/* and */) :
Code: Select all
METHOD SetPage( nSize, lReDraw ) CLASS TScrollBar
/*
local nFlags
DEFAULT lRedraw := .f.
// nSize = Max( 10, nSize )
if ! Empty( ::hWnd )
nFlags = SB_CTL
else
if ::lVertical
nFlags = SB_VERT
else
nFlags = SB_HORZ
endif
endif
::nPgStep = nSize
SetScrollInfo( If( ! Empty( ::hWnd ), ::hWnd, ::oWnd:hWnd ),;
nFlags, nSize, lReDraw )
*/
return nil
Any idea ?
Thanks a lot in advance.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Re: Problem in listbox
Antonio,
Were you already able to look at the problem in the scrollbar ?
Thank you in advance.
Were you already able to look at the problem in the scrollbar ?
Thank you in advance.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Re: Problem in listbox
Antonio,
Were you already able to read my question ?
Thanks.
Were you already able to read my question ?
Thanks.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Problem in listbox (to Antonio)
Can you show a reduced and self contained sample of the problem?
EMG
EMG
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Problem in listbox (to Antonio)
Michel,
Yes, it seems as we are wrongly calling SetScrollInfo().
As a temporary workaround you can do as you have done: simply comment out the entire method source code.
Yes, it seems as we are wrongly calling SetScrollInfo().
As a temporary workaround you can do as you have done: simply comment out the entire method source code.
Re: Problem in listbox (to Antonio)
To Antonio.
Antonio, I looked to some previous versions of FWH.
In FWH 9.01 till 9.11, the setpage methode is commented out completely.
In FWH 9.12, the methode is activated. At this moment, the problem has started.
I comment it out again (also in FWH 10.1) and everything is working fine again.
Thanks.
To Enrico.
In any example where a listbox is used, the problem occurs.
Antonio, I looked to some previous versions of FWH.
In FWH 9.01 till 9.11, the setpage methode is commented out completely.
In FWH 9.12, the methode is activated. At this moment, the problem has started.
I comment it out again (also in FWH 10.1) and everything is working fine again.
Thanks.
To Enrico.
In any example where a listbox is used, the problem occurs.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Problem in listbox (to Antonio)
Ok. Try adding the following source to scrllbar.prg:
EMG
Code: Select all
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
HB_FUNC( SETSCROLLRANGE )
{
SCROLLINFO si;
si.cbSize = sizeof( si );
si.fMask = SIF_PAGE | SIF_RANGE | SIF_DISABLENOSCROLL;
si.nPage = 1;
si.nMin = hb_parni( 3 );
si.nMax = hb_parni( 4 );
hb_retnl( SetScrollInfo( ( HWND ) hb_parnl( 1 ), hb_parni( 2 ), &si, hb_parl( 5 ) ) );
}
#pragma ENDDUMP
Re: Problem in listbox (to Antonio)
Enrico,
Thanks a lot.
Your solution saved the problem.
Antonio,
Could you correct SCRLLBAR.PRG in FWH 10.2 ?
Thanks a lot.
Thanks a lot.
Your solution saved the problem.
Antonio,
Could you correct SCRLLBAR.PRG in FWH 10.2 ?
Thanks a lot.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Problem in listbox (to Antonio)
Michel,
Fix included for next FWH 10.2
Enrico, many thanks!
Fix included for next FWH 10.2
Enrico, many thanks!
Re: Problem in listbox (to Antonio)
Antonio,
Thanks a lot.
Thanks a lot.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7