Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mouse pointer on Grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00105722
Message ID:
00105881
Vues:
32
>I find many times a read-only grid using Ingrid makes a better pick list than either a combobox or list. However, the one annoying aspect is the mouse pointer changes to a text insertion tool when over a grid.. Is there a way to modify the cursor so the arrow will be displayed?

The way I dealt with this problem gives you yet another method:
I created a container-class that had inside of it a shape and
a text box. The shape is over the text box, so the arrow mouse
cursor prevails.

The object consists of a container with a .Shape1 and a .TxtBase1
inside it; the Shape must be placed above the textbox for this
to work, and of course must be set to transparent background:

Container's Init:
local llOK, lcCS, lnPos

dodefault()

with this.parent
if type('this.parent.class') = "C" and .class = "Column"
if empty(this.txtBase1.controlsource)
this.txtBase1.controlsource = .controlsource
endif
this.width = .width
this.height = .parent.rowheight
endif
this.txtBase1.width = this.width
this.Shape1.width = this.width
this.txtBase1.height = this.height
this.Shape1.height = this.height
endwith

return

In the Shape, the .Click event can simply be (as needed):
this.parent.txtBase1.Click()

Then one can add various behaviors to the text box. One of the
other responses you received showed how to allow editing, I
believe; also a good touch!

David Alexander
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform