Scrollbars missing

Scrollbars missing

Postby Greg Gammon » Thu Feb 06, 2014 7:51 pm

I have recently noticed that none of my Listboxes have scrollbars, just blank space where the scrollbar used to be. This is only after my update to FWH 13.11 and most recent Harbour downloaded from Fivetech site.

I looked at other posts on this matter from a few years ago but it seemed to be resolved. I have tried all the fixes recommended but with no results.

I need a fix for this please!

Thanks,
GG
User avatar
Greg Gammon
 
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Re: Scrollbars missing

Postby Rick Lipkin » Thu Feb 06, 2014 9:54 pm

Greg

Are you using the ListBox class or xBrowse ?? I would like to look at your .rc or code if you don't mind posting it.

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2629
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Scrollbars missing

Postby Greg Gammon » Thu Feb 06, 2014 10:08 pm

Im using Listbox Rick. Here is snippet of sourcecode...very simple:
Code: Select all  Expand view
        REDEFINE LISTBOX oLbx FIELDS bscust->custno, bscust->company, bscust->city, bscust->phone ;
        HEADER "Custno", "Company", "City", "Phone" ;
        FONT oFontList ;
        ON DBLCLICK (oDlg1:end(), mExit := .T. ) ;
        ID 1003 OF oDlg1 UPDATE


Here is the relevant code from the .rc file (I use resedit to create resources):

Code: Select all  Expand view
LANGUAGE 9, SUBLANG_DEFAULT
118 DIALOG 15, 45, 364, 230
STYLE DS_ABSALIGN | DS_MODALFRAME | DS_SETFONT | WS_POPUP
EXSTYLE WS_EX_OVERLAPPEDWINDOW
FONT 10, "System"
{
    LISTBOX         1003, 15, 49, 335, 145, WS_GROUP | WS_TABSTOP | NOT LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN
    EDITTEXT        1000, 65, 24, 140, 12, ES_AUTOHSCROLL
    PUSHBUTTON      "Find", 1001, 215, 24, 30, 12
    PUSHBUTTON      "Select", 1009, 65, 205, 40, 12
    PUSHBUTTON      "Close", 1010, 15, 205, 40, 12
    LTEXT           "Find Company", 65535, 15, 25, 48, 8, SS_LEFT
    EDITTEXT        100, 0, 0, 364, 14, ES_AUTOHSCROLL | ES_READONLY


I have tried every permutation of scrollbar setting in ResEdit for the Listbox resource and it has no apparent change.

Thanks in advance for your help!

Greg
User avatar
Greg Gammon
 
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Re: Scrollbars missing

Postby cnavarro » Fri Feb 07, 2014 1:12 am

How many records have the database?

Have you tried the example:
\fwh\samples\testlbx5.prg
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6501
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Scrollbars missing

Postby Enrico Maria Giordano » Fri Feb 07, 2014 9:47 am

Greg,

Greg Gammon wrote:
Code: Select all  Expand view
LISTBOX         1003, 15, 49, 335, 145, WS_GROUP | WS_TABSTOP | NOT LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN




LISTBOX refers to the standard Windows listbox control, not the FWH TWBrowse. You have to use this instead:

Code: Select all  Expand view
CONTROL "", 1003, "TWBrowse", WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 15, 49, 335, 145


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

Re: Scrollbars missing

Postby Greg Gammon » Fri Feb 07, 2014 4:49 pm

Christobal,
I will look at that next this weekend when I am back at my development machine.
Thanks,
Greg

Enrico,
WOW...that would be a major problem for me to have to do as I am continually updating resources in ResEdit. Since the .rc file is generated from the .res file, I would have to manually go in and edit every Listbox instance? Is there any other way to deal with this?

Thanks,
Greg
User avatar
Greg Gammon
 
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Re: Scrollbars missing

Postby Enrico Maria Giordano » Fri Feb 07, 2014 6:17 pm

Greg,

Greg Gammon wrote:Enrico,
WOW...that would be a major problem for me to have to do as I am continually updating resources in ResEdit. Since the .rc file is generated from the .res file, I would have to manually go in and edit every Listbox instance? Is there any other way to deal with this?


No that I'm aware of, sorry. :-(

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

Re: Scrollbars missing

Postby Greg Gammon » Fri Feb 07, 2014 11:17 pm

Well thanks for the help so far. I think I am going to wait and see if there is another solution perhaps when Antonio is back.
All the scrollbars used to work in my previous FWH version (which was back in the 2.7 range I believe) so perhaps I can #include prg code from a previous version to fix this problem?

Thanks,
Greg
User avatar
Greg Gammon
 
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Re: Scrollbars missing

Postby James Bott » Mon Feb 10, 2014 5:59 pm

I have tried every permutation of scrollbar setting in ResEdit for the Listbox resource and it has no apparent change.


Code: Select all  Expand view
LISTBOX         1003, 15, 49, 335, 145, WS_GROUP | WS_TABSTOP | NOT LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN


I don't see WS_VSCROLL in the style in your RC file. You need to check Vertical Scroll in the resource editor. If ResEdit doesn't have that option, then you may need to manually edit the style in ResEdit and add it. If it does have that option, then check it, and save the RC file, then load it into a text editor and confirm the WS_VSCROLL is in the style.

Perhaps you were using Borland's resource editor before and now you are using a different resource editor so maybe that is why you are now having the problem.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Scrollbars missing

Postby Greg Gammon » Mon Feb 10, 2014 6:19 pm

James,
I will double check that when I get back from a trip. I have used ResEdit from the beginning, and have tried check/uncheck of every scroll bar option ( and combinations) in resources. But I will look at the .rc file and see what the options actually do. Thanks for the tip.
G
User avatar
Greg Gammon
 
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Re: Scrollbars missing

Postby Greg Gammon » Tue Feb 18, 2014 10:27 pm

James,

Here is the Listbox line in the .rc file:
LISTBOX 1003, 15, 45, 336, 152, WS_TABSTOP | WS_VSCROLL | LBS_NOINTEGRALHEIGHT | LBS_NOTIFY

I have tried several permutations from resources with no change in behavior. Oddly enough I can't get it to show NO SCROLL either....its just consistently showing a blank area where a scrollbar should be. I could go either way on this....no scroll bar would be fine...I just don't like the blank spot on the right of the listbox. Setting no scroll in the resources has no effect either.

I have also tried hard-coding in WS_VSCROLL to the Listbox:
Code: Select all  Expand view
        REDEFINE LISTBOX oLbx FIELDS bscust->custno, bscust->company, bscust->city, bscust->phone ;
        HEADER "Custno", "Company", "City", "Phone" ;
        FONT oFontList ;
        ON DBLCLICK (oDlg1:end(), mExit := .T. ) ;
        ID 1003 OF oDlg1 UPDATE
        Postmessage( oLbx,  nOr( WS_CHILD, WS_VSCROLL, WS_BORDER, WS_VISIBLE, WS_TABSTOP) )


Just flumoxed why this no longer works when I upgraded FWH and Habour.

Greg
User avatar
Greg Gammon
 
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Re: Scrollbars missing

Postby James Bott » Wed Feb 19, 2014 3:13 am

Greg,

I did some testing and it does seem that the missing scrollbar is a bug. I expect that it has not been noticed because most of us are now using TXBrowse because it is so much more powerful. But, I do understand why you are looking for a quick fix.

I have been mucking around in the TWBrowse class code looking for the problem but have not found it yet. I will look some more when I have some free time.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Scrollbars missing

Postby James Bott » Wed Feb 19, 2014 4:30 am

For anyone insterested, here is my test program, I just used FWH/samples/customers.dbf for the data file.

Code: Select all  Expand view
// Purpose: Simple test of LISTBOX (TWBrowse)
// Date   : 2/18/2014

#include "fivewin.ch"

Function Main()

   LOCAL oDlg, oLbx

   USE customer

   DEFINE DIALOG oDlg resource "DIALOG1"

   REDEFINE LISTBOX oLbx fields FIRST, LAST ID 10 OF oDlg

   // Things I tried without success.
   //oLbx:bLogicLen := { || If( reccount() == 0, 1, reccount() ) }
   //Postmessage( oLbx,  nOr( WS_CHILD, WS_VSCROLL, WS_BORDER, WS_VISIBLE, WS_TABSTOP) )

   //oLbx:oVScroll:=nil  // no effect

   //oLbx:oVScroll:setRange( 1, reccount() ) // getting a setrange() does not exist message

   //oLbx:lUpdate:=.t. // no effect

   ACTIVATE DIALOG oDlg

return nil
 


And here is the RC file made using Borland Workshop:
Code: Select all  Expand view

/****************************************************************************

test01.rc

produced by Borland Resource Workshop

*****************************************************************************/


#define DIALOG_1    1
#define IDC_LISTBOX1    10

DIALOG1 DIALOG 6, 15, 275, 111
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "DIALOG1"
FONT 8, "MS Sans Serif"
{
 LISTBOX IDC_LISTBOX1, 20, 15, 235, 75, LBS_STANDARD
}
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Scrollbars missing

Postby James Bott » Wed Feb 19, 2014 5:14 am

I don't think this is a good solution but it is a workaround.

In Borland Workshop if you check "scroll bar always" then the scrollbar shows.

This changes the RC file to:

LISTBOX IDC_LISTBOX1, 20, 15, 235, 75, LBS_STANDARD | LBS_DISABLENOSCROLL

Note that is has just added "LBS_DISABLENOSCROLL"

Note also that I had already tried adding WS_VSCROLL to the style in the RC file (using a text editor) and it didn't help.

The reason that this is not a good fix, is that you cannot have no scrollbar when there are not enough records to fill the browse.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Scrollbars missing

Postby Greg Gammon » Wed Feb 19, 2014 3:18 pm

James,
I really appreciate your work on this! I guess I just need to switch over to the xbrowse class. Just as a quick test I replaced my #include from tcbrowse to xbrowse and recompiled. I had one module error where I use an actual BROWSE and just commented it out to recompile and see what I get. No scrollbars still! But I may have to go back into resources and double check setups there again. Any tips on changing from tc to xbrowse?
Greg
User avatar
Greg Gammon
 
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 22 guests