Re: Focus



Actually John, what I found is that the focus is indeen on the (TDBEdit)
Control, but the cursor inside it is not showing. Would there be a way to
correct that, you reckon?

"John Furlong" <nospam_jfurlong@xxxxxxxxxx> schreef in bericht
news:450a9ef4$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Jennifer-Ashley wrote:
Hi,

Sorry for no doubt being in the wrong NG, but this is the only one I
frequently visit. In BDS 2006 (Delphi W32) I Have a form with a
TPageControl containing a few editable TDB. controls, one of which I want
to give focus when the form is opened. And that simply will NOT work. I
tried TForm.ActiveControl, I tried SetFocus in TForm.OnShow, .OnActivate,
also I tried PostMessage(Self.Handle,WM_NEXTDLGCTL,0,0), but no luck.
When the form is opened and I manually move the mouse inside the control
or use the Tab key doing that, it woks fine, alterations I then make are
neatly saved in the dataset. No problem. I just can't do it
programmatically.

Anyone please


Have you tried setting the Form's ActiveControl property (at design time)
to the required control?

Also, make sure that the Page Control's active page is set to the parent
of the control you wish to focus.

John


.



Relevant Pages

  • Re: Men, finally waking up to the rip-off.......
    ... need a> catastrophe to be able to CONTROL women. ... I'm not into controlling anyone or having anyone control me, John. ... Because you can't command and control women's bodies, ... You are ignoring the common property of the conceived in utero child. ...
    (soc.men)
  • Re: Men, finally waking up to the rip-off.......
    ... need a> catastrophe to be able to CONTROL women. ... I'm not into controlling anyone or having anyone control me, John. ... Because you can't command and control women's bodies, ... You are ignoring the common property of the conceived in utero child. ...
    (soc.men)
  • Re: Two Attempts to Capture of the Essence of Yoko Ono
    ... and an inordinate amount of control over the Beatles' legacy. ... It's about your comments saying that Yoko Controlled John. ... and Yoko's) marriage. ... and said that Jeff wasn't married to them. ...
    (rec.music.beatles)
  • Re: Two Attempts to Capture of the Essence of Yoko Ono
    ... is a fact of life. ... worse...she exercise total control over John Lennon's musical legacy ... and an inordinate amount of control over the Beatles' legacy. ... subject of John and Yoko's relationship. ...
    (rec.music.beatles)
  • Re: Lord Help Me Project
    ... as an add-on to what John said, if you are using SUM in a control, it acts on SAVED records... ... if a field is used in a calculation, on the AfterUpdate event of its control: ... if you are moving out of a subform, you might put this on the OnExit event of the subform control: ...
    (microsoft.public.access.tablesdbdesign)

Loading