Multiple Browses???

hua
Posts: 861
Joined: Fri Oct 28, 2005 2:27 am

Post by hua »

Greg Gammon wrote:One last thing I need to figure out now though is how to keep the current record in each of the browses from being highlighted unless the focus is on that particular browse....how do I code that?

I'm not sure about TWBrowse class, for TCBrowse class though, you can experiment with the following:

Code: Select all

:lNoLiteBar     If .t. No lite bar    
:lNoGrayBar   If .t. No gray bar    
User avatar
Greg Gammon
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Post by Greg Gammon »

Sounds like exactly what I need. So how do I implement using TcBrowse? I see it inherits from TWBrowse....but when I try to use the lNoGrayBar, i get a "TWBrowse" error...unless I am not doing it correctly?

oLbx:lnograybar := .t. ??
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Greg,

Here is an example browse that uses both icons and color. Note that you can see the pink flag icon even when the record is highlighted. The flag icon column can also be sorted by clicking on the header. This is useful for sorting all priority items to the top.

The gray records show inactive clients and the red records show clients with past due amounts.

Image

This was done with TSBrowse, a third-party browse. You can get a copy on my website. However, you can do something similar with TWBrowse.

http://ourworld.compuserve.com/homepage ... rogram.htm

James
hua
Posts: 861
Joined: Fri Oct 28, 2005 2:27 am

Post by hua »

Greg Gammon wrote:Sounds like exactly what I need. So how do I implement using TcBrowse?

In Fivewin's Samples folder, check the following to get some ideas; testtcbr.prg, testtcb2.prg, testtcb3, etc. You'll have to create your browse differently. You no longer can use REDEFINE LISTBOX FIELD...
I see it inherits from TWBrowse....but when I try to use the lNoGrayBar, i get a "TWBrowse" error...unless I am not doing it correctly?
If you created your browse using REDEFINE LISTBOX FIELD..., it'll get pre-processed into calling TWBrowse which don't have :lNoGrayBar data member.
oLbx:lnograybar := .t. ??
That should be correct. Anyway, if you're interested in following James idea of using TSBrowse instead of others, you'd find TSBrowse also has :lNoGrayBar
User avatar
Greg Gammon
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Post by Greg Gammon »

Hua....thanks for that info. perfect.

James,
TSBrowse is exactly what I have been looking for...opens up all the possibilities I want to implement.

I have never used 3rd party libraries, so this is new to me. I downloaded the TSBrowse and according to the instructions, I need to generate the libraries using the makelib.bat file. All I get though is an error message in the command prompt window... "RMAKE is not recognized as an internal or external command" (im running Vista). Can you guide me here? Thanks again for all of your help!
G
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Greg,

RMAKE.EXE is the Clipper make utility program. I you have it, then it needs to be in a pathed directory, or put a copy of it in the same directory as makefile.bat.

If you don't have RMAKE.EXE, then let me know and I will see if I can come up with a new sbrowseh.rmk that works with Borland's MAKE.EXE.

James
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Post by StefanHaupt »

Greg,

you can use this batch, just change the path and the language file

Code: Select all

@ECHO OFF
CLS
set fwh=d:\fwh
set include=.\INCLUDE;d:\fwh\include;%INCLUDE%
set hdir=c:\xharbour71
set bcdir=d:\Borland\bcc55\bin
set def=HB_API_MACROS 

%hdir%\bin\harbour SOURCE\Classes\TSBROWSE.PRG /n /i%fwh%\include;%hdir%\include /oOBJ\TSBROWSE.C
%hdir%\bin\harbour SOURCE\Classes\lang\SBMsgGer.PRG /n /i%fwh%\include;%hdir%\include /oOBJ\SBMsgGer.C  // <- LANGUAGE
%hdir%\bin\harbour SOURCE\Classes\TSCOLUMN.PRG /n /i%fwh%\include;%hdir%\include /oOBJ\TSCOLUMN.C
%hdir%\bin\harbour SOURCE\Classes\TSBTNGET.PRG /n /i%fwh%\include;%hdir%\include /oOBJ\TSBTNGET.C
%hdir%\bin\harbour SOURCE\Classes\TSGET.PRG /n /i%fwh%\include;%hdir%\include /oOBJ\TSGET.C
%hdir%\bin\harbour SOURCE\Classes\TSCOMBO.PRG /n /i%fwh%\include;%hdir%\include /oOBJ\TSCOMBO.C
%hdir%\bin\harbour SOURCE\Classes\TSMULTI.PRG /n /i%fwh%\include;%hdir%\include /oOBJ\TSMULTI.C
%hdir%\bin\harbour SOURCE\Classes\TMETAFIL.PRG /n /i%fwh%\include;%hdir%\include /oOBJ\TMETAFIL.C
%hdir%\bin\harbour SOURCE\Classes\SCRLLBAR.PRG /n /i%fwh%\include;%hdir%\include /oOBJ\SCRLLBAR.C
%hdir%\bin\harbour SOURCE\Classes\BTNDOWN.PRG /n /i%fwh%\include;%hdir%\include /oOBJ\BTNDOWN.C
%hdir%\bin\harbour SOURCE\Classes\RPREVIEW.PRG /n /i%fwh%\include;%hdir%\include /oOBJ\RPREVIEW.C

rem INICIO Modulos C Generados por Harbour !!!

%bcdir%\bcc32 -M -c -O2 -D__HARBOUR__ -DHB_API_MACROS -DHB_FM_STATISTICS_OFF -I%hdir%\include  -oOBJ\TSBROWSE.OBJ  OBJ\TSBROWSE.C
%bcdir%\bcc32 -M -c -O2 -D__HARBOUR__ -DHB_API_MACROS -DHB_FM_STATISTICS_OFF -I%hdir%\include  -oOBJ\SBMSGGer.OBJ  OBJ\SBMSGGER.C
%bcdir%\bcc32 -M -c -O2 -D__HARBOUR__ -DHB_API_MACROS -DHB_FM_STATISTICS_OFF -I%hdir%\include  -oOBJ\TSCOLUMN.OBJ  OBJ\TSCOLUMN.C
%bcdir%\bcc32 -M -c -O2 -D__HARBOUR__ -DHB_API_MACROS -DHB_FM_STATISTICS_OFF -I%hdir%\include  -oOBJ\TSBTNGET.OBJ  OBJ\TSBTNGET.C
%bcdir%\bcc32 -M -c -O2 -D__HARBOUR__ -DHB_API_MACROS -DHB_FM_STATISTICS_OFF -I%hdir%\include  -oOBJ\TSGET.OBJ  OBJ\TSGET.C
%bcdir%\bcc32 -M -c -O2 -D__HARBOUR__ -DHB_API_MACROS -DHB_FM_STATISTICS_OFF -I%hdir%\include  -oOBJ\TSCOMBO.OBJ  OBJ\TSCOMBO.C
%bcdir%\bcc32 -M -c -O2 -D__HARBOUR__ -DHB_API_MACROS -DHB_FM_STATISTICS_OFF -I%hdir%\include  -oOBJ\TSMULTI.OBJ  OBJ\TSMULTI.C
%bcdir%\bcc32 -M -c -O2 -D__HARBOUR__ -DHB_API_MACROS -DHB_FM_STATISTICS_OFF -I%hdir%\include  -oOBJ\TMETAFIL.OBJ  OBJ\TMETAFIL.C
%bcdir%\bcc32 -M -c -O2 -D__HARBOUR__ -DHB_API_MACROS -DHB_FM_STATISTICS_OFF -I%hdir%\include  -oOBJ\SCRLLBAR.OBJ  OBJ\SCRLLBAR.C
%bcdir%\bcc32 -M -c -O2 -D__HARBOUR__ -DHB_API_MACROS -DHB_FM_STATISTICS_OFF -I%hdir%\include  -oOBJ\BTNDOWN.OBJ  OBJ\BTNDOWN.C
%bcdir%\bcc32 -M -c -O2 -D__HARBOUR__ -DHB_API_MACROS -DHB_FM_STATISTICS_OFF -I%hdir%\include  -oOBJ\RPREVIEW.OBJ  OBJ\RPREVIEW.C

@del OBJ\*.c


rem Modulos C Nativos !!!

%bcdir%\bcc32 -M -c -D__HARBOUR__ -DHB_API_MACROS -DHB_FM_STATISTICS_OFF -I%hdir%\include;%fwh%\include -oOBJ\GetBtn.OBJ   SOURCE\FUNCTION\GETBTN.C
%bcdir%\bcc32 -M -c -D__HARBOUR__ -DHB_API_MACROS -DHB_FM_STATISTICS_OFF -I%hdir%\include;%fwh%\include -oOBJ\SCROLL.OBJ   SOURCE\FUNCTION\SCROLL.C
%bcdir%\bcc32 -M -c -D__HARBOUR__ -DHB_API_MACROS -DHB_FM_STATISTICS_OFF -I%hdir%\include;%fwh%\include -oOBJ\TSBFUNCS.OBJ SOURCE\FUNCTION\TSBFUNCS.C



@del LIB\SBrowseX.LIB


rem %bcdir%\tlib lib\TWBRW32x.LIB -+obj\wbrowse.obj > lib.log
rem %bcdir%\tlib lib\TWBRW32x.LIB -+obj\wbrwline.obj >> lib.log
rem %bcdir%\tlib lib\TWBRW32x.LIB -+obj\tmultise.obj >> lib.log

d:\borland\bcc55\bin\Tlib lib\Tsbrw613 +obj\TSBrowse     > Lib.log
d:\borland\bcc55\bin\Tlib lib\Tsbrw613 +obj\SBMsgGer     >> Lib.log
d:\borland\bcc55\bin\Tlib lib\Tsbrw613 +obj\TSBFuncs     >> Lib.log
d:\borland\bcc55\bin\Tlib lib\Tsbrw613 +obj\TSColumn     >> Lib.log
d:\borland\bcc55\bin\Tlib lib\Tsbrw613 +obj\TSBtnGet     >> Lib.log
d:\borland\bcc55\bin\Tlib lib\Tsbrw613 +obj\TSGet        >> Lib.log
d:\borland\bcc55\bin\Tlib lib\Tsbrw613 +obj\TSCombo      >> Lib.log
d:\borland\bcc55\bin\Tlib lib\Tsbrw613 +obj\TSMulti      >> Lib.log
d:\borland\bcc55\bin\Tlib lib\Tsbrw613 +obj\ScrllBar     >> Lib.log
d:\borland\bcc55\bin\Tlib lib\Tsbrw613 +obj\RPreview     >> Lib.log
d:\borland\bcc55\bin\Tlib lib\Tsbrw613 +obj\TMetafil     >> Lib.log
d:\borland\bcc55\bin\Tlib lib\Tsbrw613 +obj\Scroll       >> Lib.log
d:\borland\bcc55\bin\Tlib lib\Tsbrw613 +obj\GetBtn       >> Lib.log
d:\borland\bcc55\bin\Tlib lib\Tsbrw613 +obj\BtnDown      >> Lib.log


rem @del tmplib.bc

@echo Library built
rem copy lib\SBrowseX %hdir%\lib
kind regards
Stefan
User avatar
Greg Gammon
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Post by Greg Gammon »

Most appreciated...should have posted that James and I worked it all out...turned out the culprit was in the BCC32.cfg file...missing include paths for FWH...AND....you can't have ANY spaces in the include path string...learned a bit on that one!
Greg
Post Reply