Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tooltips over activeX control
Message
De
25/09/2006 19:04:11
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Tooltips over activeX control
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01157122
Message ID:
01157122
Vues:
64
This was beaten up several times, which actually helped me a lot.

The AX I'm using doesn't have tooltips, but provides a hook - where the parameters are the control's .left, .top, .tooltiptext, lShow. So I only have to draw the tooltip myself. Actually, the vendor shows (in C# and VB samples) that this text should go into the status bar, but that'd mean I'd have to add a status bar below the AX, which would involve even more code.

So I tried to walk a label (white opaque background, borderstyle=1, autosize) to where it should be, and make it visible when needed - and of course it went beneath the AX. Which I should have remembered... well, next I tried to build a form which would be just a wrapper around the label, but it wouldn't get small enough.

Then I searched here and - voila, there's an old message by NickN, where he uses define window ... name. Which is actually a form with all the properties set the way I need them. Very good.

Now the next problem: some of the AX's buttons are actually showing other buttons - sort of like menus or cascading toolbars. So when the user hovers the mouse over such a button, the next level toolbar shows up, but clicking any of the buttons in it doesn't work, because my tooltip form has stolen the focus.

The solution was simple: instead of showing and hiding the tooltip form, I started just switching its .left between the proper location passed as parameter and -2000. Everything works now :).

I wrote this just in case it may help someone.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform