Hi,
Thanks for that - works well now 
here is the complete test code, if anyone wants to play with it:
Cheers Stephen
from Blender.Draw import *
from Blender.BGL import *
incW = 0
incMAX = 296.00
objno = 300
def gui():
glClearColor(0.5,0.5,0.75, 0.0)
glClear(GL_COLOR_BUFFER_BIT)
DrawglBOX(0,100,200,300,50)
DrawglBOX(1,102,202,incW,46)
Button("Exit", 1, 100, 100, 100, 50, "Exit")
Button("Go", 2, 200, 100, 100, 50, "Go")
def DrawglBOX(type,x1,y1,W,H):
x2 = x1 + W
y2 = y1 + H
glColor3f (0.0, 0.0, 0.7);
glLineWidth (1);
if (type == 0):
glBegin (GL_LINE_LOOP);
elif (type == 1):
glBegin (GL_POLYGON);
else:
glBegin (GL_POLYGON);
glVertex2f (x1, y1);
glVertex2f (x2, y1);
glVertex2f (x2, y2);
glVertex2f (x1, y2);
glEnd ();
def event(evt, val):
if (evt == ESCKEY and not val): Exit()
def bevent(evt):
global incW, incMAX, objno
if (evt == 1): Exit()
if (evt == 2):
for x in range(objno):
incW = int(((x+1.0)/float(objno)) * incMAX)
print objno, x,incMAX, incW
Redraw() #To test use 'Draw()' - much slower!
Register(gui, event, bevent)