Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Select All Text when beginning Edit
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Select All Text when beginning Edit

 Post Reply Post Reply
Author
Message
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post Topic: Select All Text when beginning Edit
    Posted: 04 August 2005 at 11:55am

When the user starts to edit a value in ReportControl, I want to automatically select all the text because the user will typically be replacing the entire value.  Currently, it places the cursor at the first offset and has no selection.  This means the user has to then delete all the text before entering the new value.

Is there any way to specify that all text should be selected when beginning an edit operation?

Thanks in advance.

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2006 at 11:51am
Found your message today Embarrassed

The answer would be to set .SelectTextOnEdit of the corresponding item edit options to True (whether on populating the control, or just before starting editing). Example below:

With wndReportControl
    .FocusedRow.Record(COLUMN_SUBJECT).CreateEditOptions
    .FocusedRow.Record(COLUMN_SUBJECT).EditOptions.SelectTextOnEdit = True
    .EditItem .FocusedRow, .Columns.Find(COLUMN_SUBJECT)
End With


--
WBR,
Serge
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.