FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Scrollbars missing
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Scrollbars missing
Posted: Thu Feb 20, 2014 05:02 PM
Enrico,

Code (fw): Select all Collapse
oXbrw := TXBrowse():new():CreateFromResource( 11 )

All my xbrowses are made with code so I have no experience with creating one from a resource. I note that the above line creates a browse with all fields in the database.

I am wondering how one would just add specified fields? Can you provide an example? Do you have to delete all the default fields first, then add only the ones you want?

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 105
Joined: Fri Jun 09, 2006 03:27 PM
Re: Scrollbars missing
Posted: Thu Feb 20, 2014 05:03 PM

I'll experiment with that and see what I can get to work. I'll probably just wait and edit the .rc file when I have finished updating dialogs and then go from there.
G

Regards,

Greg Gammon
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Scrollbars missing
Posted: Thu Feb 20, 2014 06:13 PM
James,

James Bott wrote:Enrico,

Code (fw): Select all Collapse
oXbrw := TXBrowse():new():CreateFromResource( 11 )

All my xbrowses are made with code so I have no experience with creating one from a resource. I note that the above line creates a browse with all fields in the database.

I am wondering how one would just add specified fields? Can you provide an example? Do you have to delete all the default fields first, then add only the ones you want?

James


Sorry, I'm not familiar with TXBrowse. However, you can find many samples in your FWH samples directory.

EMG
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Scrollbars missing
Posted: Thu Feb 20, 2014 10:49 PM
Greg,

Here is another option--use xbrowse instead of wbrowse. It looks like it is syntax compatible so there would only be one change to your source code.

Code (fw): Select all Collapse
        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


You would just have to change LISTBOX to XBROWSE. Of course, you still have to convert the resource to a custom control.

Adding these lines gets you a much nicer looking browse:

Code (fw): Select all Collapse
        oBrw:nMarqueeStyle    := MARQSTYLE_HIGHLROW
        oBrw:lRecordSelector  := .f.
        oBrw:nStretchCol      := STRETCHCOL_LAST
        oBrw:nRowDividerStyle := LINESTYLE_LIGHTGRAY


James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 105
Joined: Fri Jun 09, 2006 03:27 PM
Re: Scrollbars missing
Posted: Thu Feb 20, 2014 11:19 PM

James...thanks again! I will have time this weekend to try these suggestions and will let you know how it works out.
G

Regards,

Greg Gammon
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: Scrollbars missing
Posted: Fri Feb 21, 2014 10:12 AM
Greg,
I guess I need to switch to a different resource editor that will use native .rc file.


I suggest to use the resource editor of PellesC, it´s free and very good.
kind regards

Stefan
Posts: 105
Joined: Fri Jun 09, 2006 03:27 PM
Re: Scrollbars missing
Posted: Fri Feb 21, 2014 02:48 PM

Thanks Stefan. I actually looked at that a while back but the download I did had malware attached. Do you have a good download link?
G

Regards,

Greg Gammon
Posts: 105
Joined: Fri Jun 09, 2006 03:27 PM
Re: Scrollbars missing
Posted: Sun Feb 23, 2014 08:52 PM

Problem is solved thanks to everyone's help!

I downloaded Pelles C that allows me to use just the .rc file for GUI design (ResEdit uses a binary file and then saves as RC after finishing).

The only thing I had to do was a search and replace in the .rc file replacing "listbox" with "twbrowse". I will begin to experiment with xbrowse soon.

Again, thanks for all the help!

Greg

Regards,

Greg Gammon

Continue the discussion