Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General Discussion » View Thread |
Messages 1 to 10 of 13 total |
Wandering cursor - nothing to do with databases I hope |
Fri, Aug 1 2008 2:57 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | I know other people have had a similar problem. There are posts on CodeGear about it, unfortunately no solutions so I'm trying desperately here.
On one of my forms I have a TWPRichText from WPTools. Its set as a single line so I can have effectively a TEdit with spellcheck (Addict). When I click into it the cursor disappears. I found out that what's happening is the cursor drops down to the line below. Since I had the control set to single line high it effectively vanishes. As I type the cursor briefly appears after the character and then whizzes back down a line. I discovered what was going on when I expanded the component to several lines high. Just to see I dropped a standard TRichEdit and a standard TMemo on the form and they behave the same way. Naturally when I try to replicate this on a brand new project I can't. Also other forms with the same single line TWPRichText behave themselves. Suggestions on the back of a bottle of hair replacement tonic welcome. Roy Lambert |
Fri, Aug 1 2008 8:07 AM | Permanent Link |
"John Hay" | Roy
> On one of my forms I have a TWPRichText from WPTools. Its set as a single line so I can have effectively a TEdit with spellcheck (Addict). When I click into it the cursor disappears. I found out that what's happening is the cursor drops down to the line below. Since I had the control set to single line high it effectively vanishes. As I type the cursor briefly appears after the character and then whizzes back down a line. I discovered what was going on when I expanded the component to several lines high. > > Just to see I dropped a standard TRichEdit and a standard TMemo on the form and they behave the same way. > > Naturally when I try to replicate this on a brand new project I can't. Also other forms with the same single line TWPRichText behave themselves. > > Suggestions on the back of a bottle of hair replacement tonic welcome. Now that is a really weird one. Not surprised you need the hair tonic If you are not at the end of the text does it still happen? If yes then if you get the value of control.selstart does it appear to be correct? If you have a button which explicitly sets the value of selstart and sets focus to the control does the cursor move back to the correct position? In you brand new project did you have all the third party components used in the app which shows the problem? Does the app have any timers or threads actrive when the problem arises? John |
Fri, Aug 1 2008 8:31 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | John
>If you are not at the end of the text does it still happen? Yup, I can cursor back to partway through the text and the cursor stays there until I press a key at which point it runs away. >If yes then if you get the value of control.selstart does it appear to be >correct? I'll check >If you have a button which explicitly sets the value of selstart and sets >focus to the control does the cursor move back to the correct position? I tried explicitly doing a setfocus but not setting selstart I'll see. >In you brand new project did you have all the third party components used in >the app which shows the problem? Yup, all I did was create a new project and then copy the form into it. I also tried copying all the controls from the awkward form to another one. Both work fine. >Does the app have any timers or threads actrive when the problem arises? None of the timers are active and no background threads. Thanks for the suggestions. Roy Lambert |
Fri, Aug 1 2008 8:43 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | John
Got it slightly wrong. When I cursor back the cursor vanishes when I release the key. I dropped a button on with showmessage(inttostr(projectname.SelStart)); and its showing the correct position each time. I just tried projectname.SetFocus; projectname.SelStart := 3; And the cursor briefly reappears in the right position and then poof gone. Roy Lambert |
Fri, Aug 1 2008 8:52 AM | Permanent Link |
"John Hay" | Roy
> Yup, all I did was create a new project and then copy the form into it. I also tried copying all the controls from the awkward form to another one. Both work fine. Do you mean you copied all the controls from one form to another in the same app and it worked fine??? John |
Fri, Aug 1 2008 9:07 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | John
I just tried dropping a TWPRichText onto the main form and that worked fine. I next tried adding a new form into the app - blank and copied the same component there. It bombs. The only thing I can think of is I'm creating the for where it bombs at run time eg application.CreateForm(tform1,form1); form1.showmodal; form1.free; but why that should matter I don't know. Roy Lambert |
Fri, Aug 1 2008 9:07 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | John
No it was a blank form in a test app - but read the later posts. It gets "better". Roy Lambert |
Fri, Aug 1 2008 9:42 AM | Permanent Link |
"John Hay" | Roy
> I just tried dropping a TWPRichText onto the main form and that worked fine. I next tried adding a new form into the app - blank and copied the same component there. It bombs. > > The only thing I can think of is I'm creating the for where it bombs at run time eg > > application.CreateForm(tform1,form1); > form1.showmodal; > form1.free; Bizarre. What if you add a new form and leave it as autocreated (if you are not doing that) ? John |
Fri, Aug 1 2008 10:47 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | John
It just gets worse Move it to autocreate and access through the mainmenu and bomb. Move to autocreate and make it the first form - great. Create a new app with two forms. Drop the TWPRichText onto form2, call from a button on form1 and .... great Drop a mainmenu of form1, add item and access through mainmenu and great. I'm coming to the conclusion there's something weird on my main form that's stuffing it, but what!!!!! Roy Lambert |
Fri, Aug 1 2008 10:57 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | John
You were right at the beginning - it was a timer which was being turned on when it shouldn't have been. Thanks for your help. Without your prompting I'd probably never have tracked it down. Now off to attack component writer Roy Lambert |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |