A scrollbar does “emit” it’s data by changing that 0 before the tool tip to 1.
Thing is that it is emmitting to the output window. What I would like to do is see that change in the window that I am looking at as I am making it.
Putting a Blender.Redraw() sends me back to the text window.
Can I update the screen as the value from the slider bar changes?
from Blender.Draw import *
from Blender.BGL import *
def gui():
global Tscroll
glClearColor(.7 , .27, .188, 10)
glClear(GL_COLOR_BUFFER_BIT)
glRasterPos2i(50, Tscroll.val)
Text (Ttext)
Button("Exit", 1, 400, 500, 150, 25, "In Parenthesis on Button Line")
Tscroll = Slider('test: ',5, 200, 50, 500, 20, Tscroll.val, 175, 275, 1, "cc")
def event(evt, val):
# print "event : ", evt , val
if (evt == ESCKEY and not val): Exit()
if (evt == 11):
print "Up"
if (evt == 10):
print "Down"
def bevent(evt):
# print "bevent : ", evt
if (evt == 5):
print "slider value = ", Tscroll.val
if (evt == 1): Exit()
Tscroll = Create(20)
Ttext = repr (Tscroll.val )
Register(gui, event, bevent)