Subject Re: SpeedTip followup
From AndrewS <no@nomore.com>
Date Fri, 24 Feb 2023 10:27:27 +1100
Newsgroups dbase.getting-started

Tom,

I am running dBase 2019 in a W10 virtual machine:

dBASE 2019 13.20  b2618 (11/26/2019-EN191126)
Windows 10 Pro 22H2 build 19045.2486
VirtualBox 6.1.42
Ubuntu 20.04.5 Gnome

When I change your code, to the following, I have no problems and it runs fine.

It appears your problem MAY be a systems integration problem. Unfortunately, this is no longer considered important, so good luck finding the answer.

FWIW ...

My mouse and keyboard are Logitech:

MX Master 3
MX Keys

using a unifying receiver attached to an Aten CS1824 KVM switch.

regards, AndrewS

*
** 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
     * ------------------------------------------ *

       this.TL1 = new TEXTLABEL( this.parent )   // this.parent == the FORM !!!
      
       this.TL1.top := this.top + 1
       this.TL1.width := 22.0
       this.TL1.height := 22.0
       this.TL1.left := (this.left + this.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( )
         *

          do case
             case  this.parent.colorNormal == "LightGrey"
                   this.parent.colorNormal := "Fuchsia"
             case  this.parent.colorNormal == "Fuchsia"
                   this.parent.colorNormal := "LightGrey"
          endcase

         *this.parent.colorNormal := iif( this.parent.colorNormal = "LightGrey","Fuchsia","Lightgrey")
         *
    return
     *

endclass

*

On 22/2/23 09:40, 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
>
> *