Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cursor disappears

Status
Not open for further replies.

mpgalvin

Programmer
Feb 5, 2001
119
IE
Has anyone else had problems with a disappearing cursor? In test, when the user tabs to a text box (a normal text box), the cursor just vanishes. They can still type as normal, and if they click on the box, the cursor comes back.

We cannot recreate it in development, but obviously, it's fairly annoying for the tester, and will probably happen when the app is released too.

Any thoughts?
 
Can't say I've ever had that problem before. It's also strange that it only happens with a textbox;
- have you tested it with any other objects
- is it the same textbox everytime
- is it on a particular form
- have you checked the fore/back etc colours of your textbox
- I know you said a normal textbox but are you sure it's not a subclass of anything
Hope this has been helpful

Gem aka "the new KID"
 
Actually I find that behavior quite often, in a variety of programs. I've never paid attention to whether or not they're only VFP programs, however. It may have something to do with being at the left edge of the box and the cursor being somehow 'covered' by the box.

I suspect that you can solve it by changing something in the base textbox class, however. I'm assuming you've followed the recommended practice and subclassed all the base classes before you started your project?

I'll take a look at it when I'm off line and if nobody's given a solution by the time I'm back on, I'll report my findings. --Dave
 
Dave, I understood your response perfectly until the phrase "subclassed all the base classes". No idea what you're talking about, although it sounds important!

I'm still getting this problem intermittently, with different forms, different text boxes at different times. The QA team are really annoying me with it, so if someone can help me, that'd be great.
 
In all probability the focus is set to some other control and so you are not seeing the cusrsor. The focus gets to the text box when you click the text box. And again this happens intermitantly.. because some event is actually putting the focus to some where else when that event happens.. and that doesnt happen all the time.

So the solution could be to look into all the events in your form.

TO START WITH... I suggest you clcik the TAB ORDER in the forms desgn canvas and set the TAB ORDER in the order you want and run the form. This could solve your problem.
ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
 
- Dave, I understood your response perfectly until the
- phrase "subclassed all the base classes". No idea what
- you're talking about, although it sounds important!

mpgalvin:

OOP design is the most beautifull aspect of VFP (IMHO). If you are curious I recommend reading some books about it, it will surely give you many programming advantages.

In fact, at our productgroup we only use (sub)classes in our (Codebook based) framework. The only 'form' we use that is an SCX type form is our splashscreen at startup.

HTH,

Weedz (Wietze Veld) They cling emotionally to code and fix development rather than choosing practices based on analytical assesments of what works best. - Steve McConnell
 
Ramani, that's not that case because you can still type into the field with the missing cursor. If you type fast enough, you can see a "spluttering" cursor flash ahead of the text you type. Weird, and not something I think I can fix.

Weedz, thanks for the heads-up. The only VFP book we have is a copy of Hacker's Guide, which we bought on recommendation and is more of a reference guide for those who know what they want, rather than a book used to find the joys of VFP. Any books you'd care to recommend to a company that didn't know it could subclass....?
 
Special Edition - Using Visual FoxPro 6
Que Corporation, 1999, USA
ISBN 0-7897-1808-1
Library of Congress Catalog Card Number: 98-86968 Diederik Vermeeren
verm1864@exact.nl
 
Gavin,

Actually the principle behind subclassing is extremely simple as well as important. The base classes which FoxPro provides are fixed, unchangable. Therefore anything you build using them can't be changed. But if you first create a subclass from the base class, you can always go back to that subclass and change it. This automatically changes any form or whatever created using the subclassed object. So if you've been using standard FoxPro forms and suddenly your boss comes along and says he wants to replace the fox symbol with the company logo, you don't have to go and change every program in house. You just go to your original subclass and change it and every program will now have the company logo showing.

The only thing such a thing demands is some structure to your programming. You must always create new subclasses for new projects using a master subclass, rather than directly from the base classes or it won't be possible to make changes to all programs at once.

Dave

Dave Dardinger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top