Hi Peter,
 
   Your code example is OK, but 'startfarve' and
'slutfarve' are not variables, they are constants
and I can't modify their values.
 
   In fact, I try to set style values from a database
and I need to use variables ...
 
   Thanks for your help, Peter.
 
Carlos Montalvillo G�mez
SGSMap - Ingenieros Consultores
Camino de Portuetxe, 83
20018 - San Sebastian - Espa�a
Tel (+34) 943 31 74 90
http://www.sgsmap.com/
mailto:[EMAIL PROTECTED]
 
----- Original Message -----
Sent: Thursday, June 15, 2000 10:50 AM
Subject: RE: MI Create Styles


Hi Carlos, Jacques

Try this code I  use it with no problems

include "mapbasic.def"

define startfarve red
define slutfarve  blue

declare sub main

sub main
    dim bn, i as smallint,
        brushStyle() as brush

    cls

    bn = 20
    Create styles
        from Brush(2, startfarve, 0)
        to   Brush(2, slutfarve,  0)
        Vary Color by "RGB"
        Number bn
        into variable brushstyle

   for i = 1 to bn

     print Str$(BrushStyle(i))

   next
end sub


Peter Laulund
National Survey and Cadastre, Denmark


Reply via email to