Announcement

Collapse
No announcement yet.

Selecting text in a TEXTBOX

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Charles Dietz
    replied
    use CONTROL POST instead of CONTROL SEND
    see: http://www.powerbasic.com/support/fo...ML/006749.html

    CONTROL POST hdlg,%CtrlID, %EM_SETSEL, 0,-1

    Leave a comment:


  • Michael Mattias
    replied
    Select all the text in each control when you build it; and do not use ES_NOHIDESEL style. Then when control gets focus the selected text(all) will be highlited.

    Leave a comment:


  • Ken Elvehjem
    replied
    Bob,

    Thanks for the reply... it works just like you said. I wish I knew a way to make it select all the text when I click in the box -- Like the Address bar in IE...

    Sincerely,

    Ken

    Leave a comment:


  • BOB MECHLER
    replied
    Clicking in the field doesn't seem to trigger it. Tabbing into it shouldn't need any special extra coding.

    Bob Mechler

    Leave a comment:


  • BOB MECHLER
    replied
    Code:
     
              CONTROL SEND hdlg,%CtrlID, %EM_SETSEL, 0,-1
    in the %EN_SETFOCUS event for the control in the dialog callback
    Bob Mechler

    Leave a comment:


  • Ken Elvehjem
    started a topic Selecting text in a TEXTBOX

    Selecting text in a TEXTBOX

    Hi,

    I am working on a program that has a number of textboxes. They are loaded from a fixed length string array when the program starts.

    The user will need to edit some (hopefully very little) of the info in the text boxes.

    What I can't seem to find is a way to highlight the entire existing contents of the TEXTBOX control when a user clicks or tabs into it.

    Is there a simple way to do this?

    Ken
Working...
X