Text object color changes

Text object color changes

Post by Mark Llewell » Thu, 11 Sep 1997 04:00:00



Hello all,

I would like to be able to display a "Processing information..." message
with the font color cycling every 500 ms or so to give the appearance that
something is working (while several *queries* are working in the code).

I've tried the following:

In the pushbutton that starts the query processing:
self.setTimer(500)

-----------------
In the pushbutton's Timer method:

inc_color       longInt

inc_color = inc_color + 1

if inc_color > 16 then
  inc_color = 0
endif

PleaseWaitBoxText.font.color = inc_color
------------------

I could not find an example to do this, or a "header" file that lists the
equates.  Can you help me out?

Thanks,

Mark Llewellyn
United Airlines

 
 
 

Text object color changes

Post by Kenneth So » Fri, 12 Sep 1997 04:00:00


?Hello all,
?
?I would like to be able to display a "Processing information..." message
?with the font color cycling every 500 ms or so to give the appearance that
?something is working (while several *queries* are working in the code).
?
?I've tried the following:
?
?In the pushbutton that starts the query processing:
?self.setTimer(500)
?
?-----------------
?In the pushbutton's Timer method:
?
?inc_color     longInt
?
?inc_color = inc_color + 1
?
?if inc_color > 16 then
?  inc_color = 0
?endif
?
?PleaseWaitBoxText.font.color = inc_color
?------------------
?
?I could not find an example to do this, or a "header" file that lists the
?equates.  Can you help me out?
?
?Thanks,
?
?Mark Llewellyn
?United Airlines
?
Hi Mark,

I have little doubt that there are more elegant approaches, but
this works, of course for your purposes, lightGray-darkGray might
make more sense...

method timer(var eventInfo TimerEvent)
        if self.visible=true
                then
                        if self.color=red
                                then
                                        self.color=green
                                else
                                        self.color=red
                        endIf
                        self.visible=false
                else self.visible=true
   endif
endMethod

method open(var eventInfo Event)
        self.setTimer(40)
endMethod

method close(var eventInfo Event)
        self.killTimer()
endMethod
--

Please respond here, and also via email (after removing "SPAMLESS.")

-Kenneth