Hi all

I thought I'd give some feedback regarding some recent postings. I had a 
table of countries displayed in a grid and I wanted to display a map on 
the same form and have the fiill color of the countries change as the 
grid row changed.  I was looking for a solution to work with a map in 
SVG format (although I had the same map in Visio VSS and was prepared to 
use that).

Whilst I was still struggling to find an SVG solution, I worked with 
Visio and had this in the AfterRowColCange of the grid:

THISFORM.oleControl1.Document.Pages(1).Shapes(TRIM(curShapes.ShapeID)).Cells("FillForegnd").ResultIU
 
= 4

Works great EXCEPT it was taking 10-11 seconds for the map to be updated 
on the form as I moved from row to row !!

Anyway I finally found this

http://esvg.ultimodule.com/bin/esvg/templates/splash.asp?NC=1689X

which is exactly what I needed to work with the SVG from VFP.  This is 
what I put in the AfterRowColChange

WITH THISFORM.oleControl1

    IF NOT EMPTY(THISFORM.LastNode)
        loElement = .Document.GetElementByID(THISFORM.LastNode)
        loElement.setAttribute("fill", THISFORM.LastNodeColor)
    ENDIF

    loElement = .Document.GetElementByID(TRIM(curShapes.ShapeID))
   
    THISFORM.LastNode = TRIM(curShapes.ShapeID)
    THISFORM.LastNodeColor = loElement.GetAttribute("fill")
   
    loElement.SetAttribute("fill", "green")
   
ENDWITH

It is blindingly fast - you can hold the downarrow key and the map is 
updated as fast as you can go through the grid.  Amazing !

Hope somebody might find this useful

Cheers

Paul Newton



_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to