Tbrowse help needed - tbrowse [1/1] 
Author Message
 Tbrowse help needed - tbrowse [1/1]

In my Tbrowse I have a VAT tarrif system that uses a letter like '0' for
no VAT, 'L' (low) or 'H' (high).  The VAT itself is in a .MEM file,
When there is a 'H' I want to display for instance 20% instead of 'H'
is this possible in TBrowse?

And is a full width (80 colums) scrollbar in stead of a one field bar
possible in TBrowse.
I have written a .PRG to make such a bar but this works much slower
although it does the job well on a XT it is really slow.

Thanx.

Frits v/d Laan
Gouda NL
Frits v/d Laan
Biologische boomkwekerij
Gouda
http://www.*-*-*.com/



Sun, 24 Jan 1999 03:00:00 GMT  
 Tbrowse help needed - tbrowse [1/1]


Quote:

> In my Tbrowse I have a VAT tarrif system that uses a letter like '0' for
> no VAT, 'L' (low) or 'H' (high).  The VAT itself is in a .MEM file,
> When there is a 'H' I want to display for instance 20% instead of 'H'
> is this possible in TBrowse?

Dead easy. For the column object that will display the VAT, just call
a function that does the conversion, for example:

        TBColumn( "VAT", {|| Vat2Pcent( FIle->Field } )

Coding the Vat2PCent() function is left as an exercise for the reader. :-)

--
Take a look in Hagbard's World: |     w3ng - The WWW Norton Guide reader.
http://www.acemake.com/hagbard  |  ng2html - The NG to HTML converter.
For pgp public key send mail to |       eg - Norton Guide reader for OS/2.



Mon, 25 Jan 1999 03:00:00 GMT  
 Tbrowse help needed - tbrowse [1/1]


Quote:
>  TBColumn( "VAT", {|| Vat2Pcent( FIle->Field } )
> Coding the Vat2PCent() function is left as an exercise for the reader. :-)

Darn !
I knew I was getting carried away :)

Anne.



Mon, 25 Jan 1999 03:00:00 GMT  
 Tbrowse help needed - tbrowse [1/1]


Quote:
> When there is a 'H' I want to display for instance 20% instead of 'H'
> is this possible in TBrowse?

Sure, intead of referring to the field directly, write a UDF, BTWCode() for
example and use that in the browse-expression.

FUNCTION BTWCode(cCode, nLen)
STATIC acBTW
LOCAL cRet, nCode
DEFAULT nLen TO 6
IF IS_NIL(acBTW)
   // Read BTWCodes into array here //
   // For example; //
   // { {"H", 17.5}, {"L", 6%}, {"N", 0} } //
ENDIF
nCode := ASCAN(acBTWCode, {|a| a[1]==cCode} )
IF nCode>0
   cRet := LTRIM(STR(acBtwCode[nFound, 2],10,2))+" %"
ENDIF
cRet := PADL(cRet, nLen)
RETURN cRet

Quote:
> And is a full width (80 colums) scrollbar in stead of a one field bar
> possible in TBrowse.
> I have written a .PRG to make such a bar but this works much slower
> although it does the job well on a XT it is really slow.

Never used a hortizontal scrollbar myself.
Maybe you can post (part of the) so that at least some of the optimizers here
can feel challenged ? :)

Anne.



Mon, 25 Jan 1999 03:00:00 GMT  
 Tbrowse help needed - tbrowse [1/1]

+-
| > In my Tbrowse I have a VAT tarrif system that uses a letter like '0' for
| > no VAT, 'L' (low) or 'H' (high).  The VAT itself is in a .MEM file,
| > When there is a 'H' I want to display for instance 20% instead of 'H'
| > is this possible in TBrowse?
|
| Dead easy. For the column object that will display the VAT, just call
| a function that does the conversion, for example:
|
|         TBColumn( "VAT", {|| Vat2Pcent( FIle->Field } )
|
| Coding the Vat2PCent() function is left as an exercise for the reader. :-)
+-[DP=>All]

Dave, Dave, Dave, Dave......

Now you should know better than anybody that dis-information is the root of
conspiracies....

So, when you put an example up, make sure you get the syntax right... ;-)

DrDebug

 . DBMR v1.02 . And God Said 'Let there be light', and MRD arrived on his door step

+----------------------------------+--------------------------------------+

|    The Dark Knight Returns BBS   | MrDebug product support:             |

|      and MrDebug for Windows     | Fax&BBS:          +44 (0)1480 471465 |
|(MrDebug: THE CA-Clipper de{*filter*})|     Tel:          +44 (0)1480 403104 |
+----------------------------------+--------------------------------------+



Tue, 26 Jan 1999 03:00:00 GMT  
 Tbrowse help needed - tbrowse [1/1]

The way i've done the full with bar it is:
tbcolumn("<full title>",{|| fld1 + space(1) + udf(fld2) +
space(1) + <more fields> }

You will have to define 1 column for each screen if more than 1
screen wide. Of course all fields have to be character or
converted to char, you have to manually adjust the title
headings and make sure no column is wider than 78 char (if you
use a tbrowse border). It can be a bit of a pain to code but it
is fast.

Anne Krijger says...

Quote:


things; >>
>> When there is a 'H' I want to display for instance 20% instead
of 'H'
>> is this possible in TBrowse?

>Sure, intead of referring to the field directly, write a UDF,
BTWCode() for
>example and use that in the browse-expression.

>FUNCTION BTWCode(cCode, nLen)
>STATIC acBTW
>LOCAL cRet, nCode
>DEFAULT nLen TO 6
>IF IS_NIL(acBTW)
>   // Read BTWCodes into array here //
>   // For example; //
>   // { {"H", 17.5}, {"L", 6%}, {"N", 0} } //
>ENDIF
>nCode := ASCAN(acBTWCode, {|a| a[1]==cCode} )
>IF nCode>0
>   cRet := LTRIM(STR(acBtwCode[nFound, 2],10,2))+" %"
>ENDIF
>cRet := PADL(cRet, nLen)
>RETURN cRet

>> And is a full width (80 colums) scrollbar in stead of a one
field bar
>> possible in TBrowse.
>> I have written a .PRG to make such a bar but this works much
slower
>> although it does the job well on a XT it is really slow.

>Never used a hortizontal scrollbar myself.
>Maybe you can post (part of the) so that at least some of the
optimizers here
>can feel challenged ? :)

>Anne.

--
-------------------------------------------------------
Chris McCarthy
Nepean, Ontario, Canada
-------------------------------------------------------


Wed, 27 Jan 1999 03:00:00 GMT  
 Tbrowse help needed - tbrowse [1/1]



:
: And is a full width (80 colums) scrollbar in stead of a one field bar
: possible in TBrowse.
: I have written a .PRG to make such a bar but this works much slower
: although it does the job well on a XT it is really slow.

There is a perfectly acceptable horizontal and vertical scrollbar sample
in the CA source code (although there is a minor error in the horizontal).
Of course, you need to think carefully about where you are for the
vertical.
---
Sarah Mould

"The life so short, the craft so long to learn" Hippocrates, tr. Chaucer



Thu, 28 Jan 1999 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Need help with TBrowse

2. Need help on TBrowse object

3. Need help with TBrowse in CA-Clipper 5.2

4. TBrowse Help Needed

5. TBrowse Help Needed

6. Need help for TBrowse

7. (Help needed) Dynamic Definition Of TBrowse Field Columns

8. Help Me! I want to get help TBrowse

9. need function for tbrowse with user search

10. I need the Quick tbrowse genarator (or the demo program)

11. FiveWin Tbrowse samples needed

12. TBrowse() help

 

 
Powered by phpBB® Forum Software