Selecting Edit Text when open a FormView 
Author Message
 Selecting Edit Text when open a FormView

I would like to select text in an edit control when a FormView (MDI App) is
opened
(or selected).

I tried to put the same code that works for a dialog
(d_myCtrl.SetSel(0, -1), d_myCtrl.SetFocus())
in the OnInitialUpdate of my form.
Result: none!!???

When I override OnActivateView(...), then the above code (now put in this
message handler)
works, BUT ONLY when I select back from another view. When I first open the
view
(form wihtin program code: pForm->GetParentFrame()->Activate() ), nothing
happens, until
I click wiht the mouse on the Form background!!!???

Any ideas are welcome.

--
Nathan Troxler



Tue, 07 Aug 2001 03:00:00 GMT  
 Selecting Edit Text when open a FormView
This works for me perfectly when view is activated normally thru user
clicks.

Where are u calling the pForm->GetParentFrame()->Activate(). with that info
may be someone will be able to help

Regards,
Anupama


Quote:
>I would like to select text in an edit control when a FormView (MDI App) is
>opened
>(or selected).

>I tried to put the same code that works for a dialog
>(d_myCtrl.SetSel(0, -1), d_myCtrl.SetFocus())
>in the OnInitialUpdate of my form.
>Result: none!!???

>When I override OnActivateView(...), then the above code (now put in this
>message handler)
>works, BUT ONLY when I select back from another view. When I first open the
>view
>(form wihtin program code: pForm->GetParentFrame()->Activate() ), nothing
>happens, until
>I click wiht the mouse on the Form background!!!???

>Any ideas are welcome.

>--
>Nathan Troxler




Tue, 14 Aug 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. problems with updating text to an Edit box in FormView

2. Showing Edit box text selected

3. Size of text-fields/edit-fields depending on Font selected

4. Rich Edit text automatically selected.

5. Rich Edit control text remains Selected

6. Selecting Text in Edit Field

7. Problem: Spin Control always selects all text in edit control

8. Rich Edit Selects All Text

9. Selecting Edit Box Ctl Text - How

10. Selecting text with mouse in rich edit 2

11. preventing all text from being selected in edit box when created

12. Multiline edit, Debug vs Release, MDI Formview

 

 
Powered by phpBB® Forum Software