Subject Re: Blinking Text
From Mervyn Bick <invalid@invalid.invald>
Date Sat, 8 Jun 2019 15:04:41 +0200
Newsgroups dbase.getting-started

On 2019-06-08 2:44 PM, MUSTANSIR GHOR wrote:
> Thank you All
> Thank you Mervyn
> For my case it is a Hospital software. The reception collects receipt for sevices. This receipt creates a blank record for service povider. Therefore, we need on the service provider screen to blink to awake him that get ready to give service. So blinking feature continues to blink until it is attended.

The little custom component I posted needs a little tweak so that one
can stop the blink.  The revised code is attached.

To stop the blink

       form.blink_text1.stop_blink = true
       form.blink_text1.visible = true
      //in case it stopped with visible = false


class blink_text(parentObj) of TEXT(parentObj) custom

   with (this)
         onOpen = class::TEXT_ONOPEN
         onClose = class::TEXT_ONCLOSE
         height = 1.0
         left = 6.0
         top = 3.0
         width = 12.0
         text = "Blink text"
      function TEXT_onClose()
         this.timer.enabled = false

      function TEXT_onOpen()
         this.stop_blink = false
         this.timer = new Timer( )
         this.timer.parent = this
         this.timer.onTimer = this.blink
         this.timer.interval = 0.5
         this.timer.enabled = true
      function blink
         if this.parent.stop_blink = false
            this.parent.visible = not this.parent.visible