Subject Re: SpeedTip followup
From Lee Grant <camilee@nospam.comcast.net>
Date Wed, 22 Feb 2023 03:06:17 -0500
Newsgroups dbase.getting-started

Tom,

In addition to what Ken says, I also get his result, but I also get the
speedtip "Calendar..." when I hover over the arrow.  You color only
changes once, I suspect you may want it to change in a toggle fashion,
at which point, you should use a toggle mechanism, using a variable to
store the current state so when it get's clicked again, it can change
again based on the condition. If that's not what you wanted, please
disregard.

Lee

On 2/21/2023 5:40 PM, Tom wrote:
> Hi all,
>
> Confounded by the form included.
>
> 1) Speedtip never appears
>
> 2) Form color change works once, not every time textlabel is 'clicked'
>
> Your help and guidance appreciated. If the code looks familiar, probably
> is but I do not remember from whom I stole it. Mind the wrap.
>
> Thanks,
> Tom
> *
> ** END HEADER -- do not remove this line
> //
> // Generated on 02/21/2023
> //
> parameter bModal
> local f
> f = new ImageClicked2Form()
> if (bModal)
>     f.mdi = false // ensure not MDI
>     f.readModal()
> else
>     f.open()
> endif
>
> class ImageClicked2Form of FORM
>     with (this)
>        doubleBuffered = true
>        metric = 6    // Pixels
>        colorNormal = "LightGrey"
>        height = 352.0
>        left = 1004.0
>        top = 0.0
>        width = 280.0
>        text = ""
>        showSpeedTip = true
>     endwith
>
>     this.GETENTRY1 = new ENTRYFIELD(this)
>     with (this.GETENTRY1)
>        onOpen = class::ENTRYFIELD_ONOPEN
>        height = 24.0
>        left = 76.0
>        top = 163.0
>        width = 125.0
>        fontSize = 11.0
>        speedTip = "Assist"
>        value = ""
>     endwith
>
>
>
>      Function ENTRYFIELD_ONOPEN
>      * ------------------------------------------ *
>        oThis = this // reference the entryfield control
>        this.TL1 = new TEXTLABEL( oThis.parent ) // oThis.parent == the
> FORM !!!
>        this.TL1.top := oThis.top + 1
>        this.TL1.width := 22.0
>        this.TL1.height := 22.0
>        this.TL1.left := (oThis.left + oThis.width) - (this.TL1.width + 1)
>        this.TL1.text := "6"
>        this.TL1.colorNormal := "Red/Window"
>        this.TL1.fontName := "Webdings"
>        this.TL1.fontSize := 14.0
>        this.TL1.borderStyle := 3    // None
>        this.TL1.alignVertical := 1    // Middle
>        this.TL1.alignHorizontal := 1    // Center
>        this.TL1.speedTip := "Calendar ..."
>      this.TL1.onLeftMouseDown := class::TL1_ONLEFTMOUSEDOWN
>          *
>      return
>      *
>
>     Function TL1_onLeftMouseDown(flags, col, row)
>      * ------------------------------------------------------------- *
>          // 'click' it ...
>          this.borderStyle = 2
>          _app.executeMessages( )
>          sleep .35
>          this.borderStyle = 3
>          _app.executeMessages( )
>          *
>          this.parent.colorNormal := iif( this.parent.colorNormal =
> "LightGrey","Fuchsia","Lightgrey")
>          *
>     return
>      *
>
> endclass
>
> *