Tim Rood wrote:
> 
> I'm trying to make a single polygon in a single table change colors using MB
> and I can't seem to find the right MB incantation to make it happen.  All I

Another MapBasic agony? You might try swallowing a live toad
before sitting down to your next MapBasic session. Then
comparatively, the rest of the day will seem pretty pleasant.

Anyway, here's how to do this:
First you have to get access to the record with the polygon you
want to change. There's lots of ways to do this (see SQL select,
SelectionInfo(), fetch, etc.), but let's say the record cursor is
pointing at it, and the table is called POLY.

'---
dim objPoly as object
dim brushPoly as brush

'you need to include mapbasic.def for color definitions
brushPoly = makeBrush (2, YELLOW, WHITE)

objPoly = POLY.obj
nRow = POLY.rowid

alter object objPoly info OBJ_INFO_BRUSH, brushPoly
update POLY set obj = objPoly where rowid = nRow
'---

What I didn't understand when I was first struggling with this
myself is that you have to "update" the table or nothin shows.
Also notice the "where rowid = nRow" bit. Leave this off and ALL
you records get changed to this object.

- Bill Thoen
------------------------------------------------------------
GISnet, 1401 Walnut St., Suite C, Boulder, CO  80302
tel: 303-786-9961, fax: 303-443-4856
mailto:[EMAIL PROTECTED], http://www.ctmap.com/gisnet
------------------------------------------------------------
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to