Problem in listbox (to Antonio)

Problem in listbox (to Antonio)

Postby driessen » Thu Jan 14, 2010 9:41 am

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.
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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem in listbox

Postby Antonio Linares » Thu Jan 14, 2010 10:15 am

Michel,

Please comment this line in FWH\source\classes\scrllbar.prg:
Code: Select all  Expand view

METHOD SetPage( nSize, lReDraw ) CLASS TScrollBar

   local nFlags

   DEFAULT lRedraw := .f.

   // nSize = Max( 10, nSize )
   
   if ! Empty( ::hWnd )
      ...
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problem in listbox

Postby driessen » Thu Jan 14, 2010 11:16 pm

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.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem in listbox

Postby Antonio Linares » Thu Jan 14, 2010 11:28 pm

Michel,

These are the only changes from FWH 9.11 to 9.12 in Class TScrollBar:
Image
Commenting the line that I told you it should solve it.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problem in listbox

Postby driessen » Fri Jan 15, 2010 11:16 pm

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.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem in listbox

Postby driessen » Wed Jan 27, 2010 5:20 pm

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 :
Code: Select all  Expand view
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
 
No block is visible in the scrollbar.

If I change it this way (/* and */) :
Code: Select all  Expand view
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
 
everything is working fine. The block is visible and useable in the scrollbar.

Any idea ?

Thanks a lot in advance.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem in listbox

Postby driessen » Thu Jan 28, 2010 5:00 pm

Antonio,

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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem in listbox

Postby driessen » Sun Jan 31, 2010 9:12 pm

Antonio,

Were you already able to read my question ?

Thanks.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem in listbox (to Antonio)

Postby Enrico Maria Giordano » Sun Jan 31, 2010 9:13 pm

Can you show a reduced and self contained sample of the problem?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Problem in listbox (to Antonio)

Postby Antonio Linares » Sun Jan 31, 2010 11:22 pm

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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problem in listbox (to Antonio)

Postby driessen » Mon Feb 01, 2010 12:04 am

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.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem in listbox (to Antonio)

Postby Enrico Maria Giordano » Mon Feb 01, 2010 8:31 am

Ok. Try adding the following source to scrllbar.prg:

Code: Select all  Expand view
#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


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Problem in listbox (to Antonio)

Postby driessen » Mon Feb 01, 2010 10:12 am

Enrico,

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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem in listbox (to Antonio)

Postby Antonio Linares » Mon Feb 01, 2010 10:51 am

Michel,

Fix included for next FWH 10.2 :-)

Enrico, many thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problem in listbox (to Antonio)

Postby driessen » Mon Feb 01, 2010 12:19 pm

Antonio,

Thanks a lot.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Rick Lipkin and 60 guests